• I have three subsites. When a post is created in one of them, I need the following to happen:

    – The same post should be created in all other subsites
    – Any change to the post should occur in all subsites

    So I was looking to go with save_post action hook here, along with iteration through subsites using switch_to_blog(). The thing is, I need some sort of a unique identifier to get_post by, on each subsite. Title, slug and ID are not going to cut it since conditions differ on each subsite and they might be different from site to site.

    Any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Multisite is bad at this because it wasn’t meant for this.

    Are all three sites identical? What’s different about them, if you’re syncing all posts?

    Thread Starter rechazame

    (@rechazame)

    I only need that to happen with on custom post type. Sites are identical in structure, not in content (except for that specific post type).

    I was thinking about making the main site, which is basically not in use, as the index, in a way that post will be created in all sites, including main, and that the main site post id number will be saved to all other posts as a custom field.

    This way I can recall each post from each site in order to perform updates etc.

    What do you think?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I think there’s no painless way to do this.

    Does the CPT have to be on all sites? What if you redirected subsite.example.com/posttype/ to example.com/posttype ?

    Among other things, this will be bad for your SEO.

    Thread Starter rechazame

    (@rechazame)

    I actually didn’t think about the effect it would have on SEO… ??

    Each site represents a different music genre community. Place is a CPT created by an event plugin (tribe’s event calendar) that each site runs for its own dedicated events. Often, a dance club would have activities that are relevant for several genres and so it is right for it appear on every site. That is why I wanted to hook into post_save and duplicate the post to other sites.

    After putting down the scenario, can you think of a better solution to the situation than the one I came with?

    If not, putting the pain aside, how bad it would impact my SEO?

    Thank you Mika

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    If not, putting the pain aside, how bad it would impact my SEO?

    Well. Google hates when you have the same content on multiple sites. But… Understanding WHAT you’re doing makes this a different answer.

    What if you did this another way?

    What if instead of having the code duplicated, you ran the calendar on it’s own site? Then you assign the events to the appropriates venues, and you can use the advanced filter bar to sort them. So you could have a link from a site to see events in THAT location, but the link goes to the calendar site and auto-filters for that location.

    https://tri.be/shop/wordpress-events-filterbar/

    Example with some made up urls:

    example.com/venue1
    example.com/venue2
    example.com/events

    A link on Venue1 would be something like example.com/events?location=venue1

    And then that would list those events.

    Alternately, ask Tribe if they have a multisite code to let you maintain it from the network level. A lot of plugins do that.

    Thread Starter rechazame

    (@rechazame)

    Wow.. You never cease to amaze Mike. I am looking into it right now and also will ask Tribe if they have some other rabbit to pull for this one.

    Thank you Mika

    Thread Starter rechazame

    (@rechazame)

    Ugh.. Meant Mika* in the first sentence. Sorry.

    I think the solution you suggested could work only if I can somehow embed a filtered calendar from the calendar site to the other sites.

    Still looking into that.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘A unique network-wide identifier for posts and terms’ is closed to new replies.