Support » Networking WordPress » get posts from blogs to apear in main wp site ?

  • Hello,

    i have a wp site that has about 7 subdomains. i have installed wp 3.0 multi sites but there’s only one problem.
    is there a way that i can call posts from the sub sites to appear in the main site?
    for example the blogs are movies, music, software and …. but I want all the posts in the blogs to appear in the main one.
    please help me out this is too important for me.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @jackyjoyx123 I hope you are well today.

    If you want to show posts between all multisite WordPress try with the function get_current_blog_id() with this you can obtain the current multisite.

    I will share another link where I found the solution

    I hope this works for you 😉

    The posts_per_page argument sets how many posts to return. In your code, this is set to the constant NEWS_POSTS_PER_PAGE:

    $posts = get_news_posts([
    ‘posts_per_page’ => NEWS_POSTS_PER_PAGE
    get_news_posts isn’t a native WP function so I assume its either in a custom theme or plugin you are using, and presumably the theme / plugin has a setting to change the value of NEWS_POSTS_PER_PAGE so you really shouldn’t be changing the code.

    The correct way to change this would be to find and change that setting so that is applied across every usage of the plugin. However if you really need to do this in the code, you would set a different value for posts_per_page, e.g.

    $posts = get_news_posts([
    ‘posts_per_page’ => 5
    Hops This Helps You.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.