wp-posts-to-posts icon indicating copy to clipboard operation
wp-posts-to-posts copied to clipboard

Add Posts To Posts in mu-plugin

Open Cezarion opened this issue 10 years ago • 2 comments

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.

Cezarion avatar Sep 29 '15 11:09 Cezarion

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!

  1. First add posts-to-posts as a composer dependency "wpackagist-plugin/posts-to-posts": "1.6.x"
  2. Secondly set the installer path in in your composer.json
"extra": {
    "installer-paths": {
      "htdocs/content/mu-plugins/{$name}/" : [
        "wpackagist-plugin/posts-to-posts"
      ] 
}
  1. Run a composer update. The plugin is now in the mu-plugins folder!
  2. Add the following rule to the .gitignore file: /htdocs/content/mu-plugins/posts-to-posts/
  3. 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!

dstollie avatar Oct 04 '15 21:10 dstollie

Thank's a lot !

I'll try that

Cezarion avatar Oct 05 '15 12:10 Cezarion