• Hope I can explain this correctly.

    I had a blog page setup that lists a summary of each posts in chronological order. I had a programmer set it up so that this page would only show blogs from certain categories and not the articles.

    When I check my index.php file, I found this line:

    <?php if (in_category(1)) continue; ?>

    I deleted this and see that the page displays blogs, BUT it’s displaying blogs and articles. I want it to only show blogs. I added the code back in and the blogs disappear again.

    Is there a way that I can change this piece of coding to show only the ID’s that I want it to show? I tried adding the ID’s, but that doesn’t work…at least the way I’m doing it doesn’t work.

    Any help would be greatly appreciated. Thank you.

Viewing 1 replies (of 1 total)
  • The code, <?php if (in_category(1)) continue; ?>, says, ignore this post is the category ID is 1. So category 1 in your installation must be “blogs”.

    So if you ONLY want to show posts that are in the “blogs” category you could change that code to:

    <?php if (!in_category(1)) continue; ?>

    that says if the category IS NOT category 1 then ignore the post.

    Also might install this plugin to make it easy to determine IDs:
    https://www.ads-software.com/extend/plugins/reveal-ids-for-wp-admin-25/

Viewing 1 replies (of 1 total)
  • The topic ‘Blog Summaries missing…help please’ is closed to new replies.