WordPress.org

Forums

[resolved] Blog Posts Not Showing (10 posts)

  1. bmcintyre
    Member
    Posted 2 years ago #

    Hello,

    Quick one. Probably so easy I am missing something.

    When I create a new category/post, it is not pushing to my main blog. I have 2 other blogs (if I select for example video or podcasts) than it pushes to those category. All posts no matter what should post here, Link

    When I post with an existing category it works fine.

    Ideas?

    Thanks

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try checking your theme's main posts template for a custom query.

  3. bmcintyre
    Member
    Posted 2 years ago #

    Thanks for the reply esmi.

    Sorry my WordPress guy is out on vacation for 2 weeks, the nerve.

    This is the query I am getting.

    $args = array( 'post_type' => 'post', 'posts_per_page' => 5, 'paged' => $paged, 'cat' => '8,9,10,11,12,23' );

    Where do I find the 'cat' # (ex 8,9,10,11,12,23)

    Thanks

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    That custom query is limiting the posts shown to only those categories in that list (ie with ids 8,9 etc). If you want to open up the page to show post from all categories, change it to:

    args = array( 'post_type' => 'post', 'posts_per_page' => 5, 'paged' => $paged );

  5. bmcintyre
    Member
    Posted 2 years ago #

    Hey esmi,

    We we don't want all categories to post.

    We have 8 additional categories that we do not want posted on this page (video-web-design, video-social-media, video-seo-internet-marketing, video-mobile-marketing, podcasts-web-design, podcasts-social-media, podcasts-seo-internet-marketing, and podcasts-mobile-marketing).

    The rest and all new ones we need to post to the main blog page.

    Ideas?

    Thanks

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    You will need to find the ids for each of these categories and add them to the list in the custom query.

  7. bmcintyre
    Member
    Posted 2 years ago #

    Exactly, do you know where I find the category #, we have permalinks set up so I can't see the id #.

    Thanks

  8. bmcintyre
    Member
    Posted 2 years ago #

    I got it, just edit it and it will show the id in the URL.

    Thanks esmi!

  9. bmcintyre
    Member
    Posted 2 years ago #

    The category id was placed here (238) in this case (I triple checked this).

    $args = array( 'post_type' => 'post', 'posts_per_page' => 5, 'paged' => $paged, 'cat' => '8,9,10,11,12,23,238' );

    Still not showing the post?

    IDeas?

  10. bmcintyre
    Member
    Posted 2 years ago #

    Never mind, sorry to bug you.

    Fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags