Before you ask please READ THIS

Filter/Exclude Bolg Category from standard /blog page

edited April 2013 in Hypershot Posts: 40
Hello again,

now I have a little question:
Is it somehow possible, to exclude a certain blog category from the default /blog landing page/list?
Something like an inverted archive list :)

I would like to add some private blog posts which shouldn't be visible nor listed for the "standard" guest. Additional to that, I would like to add a menu item which links to only this category (which already works with archive).

If this was possible somehow, it would be GREAT :)

Regards,
Max

Comments

  • AirAir
    Posts: 10,970
    Hello:-)

    This rather Wordpress question then theme:-) You will have to make custom Wordpress query to make it work. I think there should be any plugin that helps with it, but on my quick search I didn't find anything interesting.

    If I find anything I will post it here.

    With regards.
  • edited April 2013 Posts: 40

    Hi, thank's for the quick hint!!
    I edited the loop.php and added one line:

    ... global $apollo13;
    ?>
    <?php query_posts($query_string . '&cat=-XXX'); ?>
    <?php /* If there are no posts to display, such as an empty archive page */ ?>
    ....

    where XXX is the number of the category.

    I have to check, whether it works everywhere.

    more about it http://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_Category

    Regards

    Max

    Post edited by macmacs on
  • Posts: 40
    The recommended plugin works like a charm. It's easier this way :)
    Thanks!!!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion