wp-posts-to-posts
wp-posts-to-posts copied to clipboard
Add Posts To Posts in mu-plugin
Thank's for this great work. I try to work with wordpress in a modern way (themosis, composer, .. ) In my current project , posts to posts is a required module and I would like that's a mu plugin.
It is not working.
Do you think this is possible ?
Thanks a lot.
I Think I can help you with this one! Im also using Themosis and I think I got this plugin working as a mu-plugin composer dependency!
- First add posts-to-posts as a composer dependency
"wpackagist-plugin/posts-to-posts": "1.6.x" - Secondly set the installer path in in your composer.json
"extra": {
"installer-paths": {
"htdocs/content/mu-plugins/{$name}/" : [
"wpackagist-plugin/posts-to-posts"
]
}
- Run a
composer update. The plugin is now in the mu-plugins folder! - Add the following rule to the .gitignore file:
/htdocs/content/mu-plugins/posts-to-posts/ - Open "load.php" in the folder "htdocs/content/mu-plugins/" and add the following rule to this file:
require_once(WPMU_PLUGIN_DIR.'/posts-to-posts/posts-to-posts.php');
Good luck!
Thank's a lot !
I'll try that