Share custom post type across all sites? (16 posts)

  1. JacoboPolavieja
    Posted 5 years ago #


    I have a multisite installation where I'd like to be able to have a custom post type "new" shared across all the sites. I mean, I'd like to be able to have all "news" written by the different authors in their site under a common path mysite.com/news/ and each "new" as mysite.com/news/titleofthenew

    As it stands now I can have the type in each site but each "new" is local to each site so their path is mysite.com/subsite/new/titleofthenew

    Is there a way to "share" or have a "global" custom post type managed by the master site?

    Thanks! Cheers!

  2. It doesn't work like that. You could instead make a site called news and have everyone post there, but ... Each site is it's own site, separate, so this is as it's designed.

  3. If you explain the end result you're looking for (and why) maybe we can come up with a better solution.

    Personally, I don't see new news as a custom post type..

  4. JacoboPolavieja
    Posted 5 years ago #

    Hello and thanks for answering!

    I'll detail more the challenge. I am building a basketball news site. The frontpage of the main site should be one which grabs the last 50 or so news and articles.
    We have collaborators, each with his own blog to write personal articles, but who should be able to post news for the site also. The main site should have its own blog too.

    In each "new" we have several custom additions: sources (list of links where the new was discovered), main country (the country of the team that signs the player), secondary countries (the country of the team that's selling it, the country of the player, etc), competitions (which basketball competition the new relates to).

    I've built "main country", "secondary countries" and "competitions" as custom taxonomies, and I'm looking at how to integrate the "sources" fields into a custom type "new".

    The idea was that when logging in their own site, each collaborator to be able to write articles for their blog or a new for the main site.

    Any idea how to improve or develop this? Thanks!

  5. Hmm. If you want them all together (that is all sorted by date, regardless of source) I wonder if http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/ can be tweaked to only pull in certain categories.

  6. Yep.

    There's also our feature posts plugin to pick and choose which posts hit the front page.

  7. But IIRC, you have to manually pick and choose the featured posts, which I would think would get annoying if you KNOW 'everything in Category NEWS is featured.'

    It may be perilously close to custom plugin world ;)

  8. Or use SWT to pull everything to a tags blog, then just pull the category you want to the main blog. :D

  9. JacoboPolavieja
    Posted 5 years ago #

    Thanks again for taking interest ;).

    As for the sitewide-tags, I had already taken a look at it, but as I want different types not categories, I don't know if it is optimum to try to change how the plugin does.

    I also read about some of the "featured posts" plugins, but I just want ALL of them, but more than that, I want them to have its permalink s mydomain.com/news/nameofthenew.

    THT is the hard bit for me. I think I can retrieve all of the posts from all the sites, but they appear as mydomain.com/subsitename/news/nameofthenew .

    MU-Helpers provide a way to request the needed posts, the problems are:
    1. Is too database intensive, as it iterates through each blog taking the last 'x' number of posts.
    2. They have their URL defined based on the author's site instead of the "master" one.

    Point 2 is what I'm really concerned of. As I don't know anything about how to manage permalinks, I just don't know if it's possible to have a type of post links based on my criteria, not the usual "mydomain.com/site/setion/nameofthepost".

    Any idea about that?


  10. You'd basically want to scrape your other blogs per category and duplicate the posts.

    That said... it's generally not a good idea to do that for SEO stuff. Duplicating data dilutes your link juice.

  11. JacoboPolavieja
    Posted 5 years ago #

    You'd basically want to scrape your other blogs per category and duplicate the posts.

    That said... it's generally not a good idea to do that for SEO stuff. Duplicating data dilutes your link juice.

    Exactly... that's why I'm asking if there's a way to "share" instead of "duplicate" ;).

    Duplicating content is a bad, really bad practice. WordPress multisite is great, but I feel many of us would like to be able to define "global" and "local" things on the system. Maybe I should write a plugin for that? I'm not an expert on PHP, but I'm giving it a thought. I'd have to look at how wp's database is structured though.


  12. Well, that's why the site wide tags plugin would be where I would start, but you're launching into specialized plugin territory, I'm afraid.

  13. If you change all your extra custom taxonomies to be custom meta fields, SWT will pull them as well.

  14. JacoboPolavieja
    Posted 5 years ago #

    I'm sorry if I'm missing something but, do "site wide tags" or SWT change the links to access the post? Remember the main thing here is to have each thing written on different blogs under mydomain.com/news/nameofthenew .

    If you could confirm anything on that I'll see if I can modify whatever is needed.

    Andrea_r, maybe it's just me, but now that WP has custom taxonomies, it doesn't sound good to me to go back to putting everything in meta fields. Organizational-wise it makes more sense to have "attributes" than "values" to me, I see it as a cleaner design. So, I'd prefer to develop something with custom post types and taxonomies, which are here to stay, than with with the little hacks they're trying to "fix".

    Thank you both for answering so many times with ideas. Cheers!

  15. No, SWT do not change the post links.

    However, I suspect you don't want to do that.

    If you change the links, then you duplicate posts, and then you loose Google Juice.

  16. @jacob Go to homeschooljournal.net and see what I did. It uses SWT. Note the permalinks.

Topic Closed

This topic has been closed to new replies.

About this Topic