• Resolved Sam

    (@lt1833)


    I am new to WP and do not know PHP (although I am planning to learn everything I can about it asap if I am to continue developing WP sites).
    I have a site that is near-ready to launch except for one problem. I am using a plugin to display printable recipes (Easy Recipe) that requires each recipe to be a separate post. I also have a straightforward blog on the site, and I don’t want the recipe posts to show on the “Blog” page as posts.
    I have 2 categories: Recipes and Blog. I assume that there is a relatively easy way to exclude the Recipes category from displaying in the Blog page.

    I have searched the forum but nothing seems exactly right for this situation, or it was too complicated for me to understand. (Yes, I read The Loop Codex) I tried the UCE plugin but it did not do what I wanted and I was hoping I could do this directly without a plugin.

    Any help greatly appreciated. Thank you so much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Sam

    (@lt1833)

    I found this, for example. but I am not sure where I would put this, since the blog is not on my home page:

    Exclude Categories From Your Home Page
    Placing this code in index.php file will cause the home page to display posts from all categories except category ID 3.

    <?php
    if ( is_home() ) {
    	query_posts( 'cat=-3' );
    }
    ?>
    Thread Starter Sam

    (@lt1833)

    It worked. Many thanks to esmi in another post!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need to exclude one category's posts from showing on general blog page’ is closed to new replies.