Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$-3
Two-way synchronizing of a post type among multisite blogs
Changes cannot show in Site C or Site D due for privacy reasons.
I am thinking that there are two main possible way of doing this, neither of which I'm sure can easily be done.
1) A plugin hooks into the edit_post so when a change is made the plugin edits the sister entry in the other blog's database table.
2) Anytime Site B views or edits an "inventory" post type it is reading it from Site A's database table.
While a setup and forget solution would of course be best I am open to a manual hack.
This was originally a Stack Exchange question.
Edit: I understand that a solution may be more than $25. If you can tell me how you will get to a solution pm me and we discuss further details.
Matt Taylor | 02/05/11 at 7:44am
Edit
Previous versions of this question:
02/05/11 at 9:33am
The experts have suggested, on average, a prize of $25 for this question.
(3) Possible Answers Submitted...
Note: Matt Taylor felt their question was unanswered, so we granted them a refund.
Note: Matt Taylor requested a refund. They offered no explanation.
If no one challenges a refund request, then they are automatically granted and proccessed after 48 hours. Admins of this site only review refund requests if someone challenges the request. If you are curious about how we handled previous refund requests, you may read over all refund requests and their challenges.
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
02/05/11
8:09amJohn Cotton says:I think you'd need to use two hooks: wp_insert_post to grab the post first time around and create it in the other blog table(s). Then store the post id and blog id of the original post in the post_meta of the second (to act as a foreign key).
Then use the post_updated hook to update the contents.
You'd need to check in the wp_insert_post that the post id didn't exist in your target tables as it gets fired both times.
PS I'm happy to write you a plug-in in that does this, but it's a bit more than $25 worth... :)Previous versions of this answer: 02/05/11 at 8:09am
-

Last edited:
02/07/11
3:15pmSébastien | French WordpressDesigner says:For 25$ i have this solution : make a site xxx with the category inventory and display the content of this site in your site A and in tour site B
Using the switch_to_blog() function
do you want more info ?Previous versions of this answer: 02/07/11 at 3:15pm
-

Last edited:
02/05/11
10:01amJoachim Kudish says:Yes hooking into the insert and update hooks would be a way to go about it. However it would be much easier to simply display the post from site A within site B.
Using the switch_to_blog() function you can do just that http://codex.wordpress.org/WPMU_Functions/switch_to_blog , while using it you can use any normal WordPress query functions to get your posts.
Note, using this function isn't recommended when you have more than a dozen sites or more then a few hundread posts as it can get quite heavy performance wise. Then again, almost every method of doing this will be resource heavy.
Another way to do it, which to me is a bit weird but would still work, would be by pulling the RSS feed from site A in site B.
In any case, try to use a caching plugin such as Super Cache or W3TC to help with performance.
Let me know if you have more questionsPrevious versions of this answer: 02/05/11 at 10:01am
- 02/05/11 10:18am
Matt Taylor says:Each site pair will have between 50 and 300 active entries at any one time. Do you think that is too much load for switch_to_blog()?
- 02/05/11 10:39am
Joachim Kudish says:Hey Ethan,
There is no secret number to how many posts will be supported. If you have a decent server than 300 posts should be okay. If you have a cheap shared host, then you may have a harder time. Again, using caching will help.
Good luck!
- 02/05/11 10:18am
This question has expired.
Current status of this question: Refunded
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
