Support » Networking WordPress » Pulling post for use on another site

  • So I have wordpress installed with multi site network option. So I have 2 different blogs 1 word press install.

    So this is where I’m running into problems. I want to use the informtion from the 2nd blog the news blog on another website. I see I have to use the get_posts() function. However I see on one of the other docs that this won’t work for Multi Site Network

    Any links or suggestions you might be able to pass on would be much appreciated.

    Since get_posts() doesn’t seem to work for multisite I was orginally goinh o use the WordPress RSS feed and parse xml on the site i needed. However that won’t work for me because if a post has a link in it i won’t get the link in the RSS.

    So this brings me to my next quesiton i was look into query the database directly. In the posts table for the blog I want to pull post from and noticed that the post was just the text and not formated text. What sort of query would you use so you get the links out of the database related to the post. What table is it stored in?


Viewing 2 replies - 1 through 2 (of 2 total)
  • The table that you’d be looking for is
    That holds al of the posts that your site has. BUT… seeing as how your uisng a multi-site install, it will be something like wp1_posts or wp2_posts or whatever number has been assigned to it. Each blog has it’s own table.

    You can get the post information by writing your own SQL query. You’d need to know which DB table to look at (wp1_, wp2_, etc) and you can extrct the information that way. There’s no stadnard way to do this from another site. When you get the content, you can run it through the normal WordPress filters to have the formatting applied. One thing to remember is that any shortcodes that are enabled for one site, but not the other could cause issues if they are used in the post that you are trying to get.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    You can use get_posts on Multisite, you just have to use switch_to_blog first.

    But generally you don’t want to replicate your data like that, as it adversely impacts SEO. Instead, I would use to pull in posts in an SEO friendly way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pulling post for use on another site’ is closed to new replies.