This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

how to omit one category from blog page?

11 years ago · Last reply by Margaux Murray 11 years ago

I’ve been trying to omit one category from my blog page, and the code doesn’t seem to be working. Please note, I am not an experienced builder, so my knowledge is limited.

What I did (following many articles on the web), is go into the editor and edit the loop.php. I added this:

<?php if (is_blog-2_page() && !is_paged() 
) $posts = query_posts($query_string . '&cat=-164'); ?>

Just above the endwhile.

BTW, I LOVE how easy you have made to edit everything in this theme! Great job :-)

URL: http://monmarchelocal.ca/blog-2/

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Andrew Misplon Staff 11 years, 3 months ago

    Hi Margaux

    Glad to hear things have been working out so far. Before going the child theme route, try this. On your blog page set the template to Default, not Blog. The page template drop down is in the right column. Next click over to our Page Builder tab, insert the Post Loop widget and use the last field of that widget to insert an argument:

    cat=-x

    Where x is the category ID you’d like to omit. Let us know how that goes.

  2. Margaux Murray 11 years, 3 months ago

    Hi Andrew,
    I just tried what you said, and it’s still not working. At the bar at the top, when I’m on the category I want, it says
    edit-tags.php?action=edit&taxonomy=category&tag_ID=164&post_type=post
    So, I was assuming that I should put
    cat=-164
    What am I doing wrong?

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread