WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Need for a catagory that doesn’t show up on the frontpage

[Resolved] Need for a catagory that doesn’t show up on the frontpage

  • Hi

    Is there any way to make a post to a catagory that does not show on the frontpage of my site?

    If not is it possible to make different sections of pages so I can sort the way they show on the side-bar.

    I have a special “page” that should only be viewed via a link from the side bar.

    J;-)

Viewing 7 replies - 1 through 7 (of 7 total)
  • See the FAQ for how to hide a category.

    And for how to sort page order.

    Entering:

    <?php
    if ((empty($_GET[‘cat’]))&&(!preg_match(‘/wp-admin/’, $_SERVER[‘REQUEST_URI’]))) $cat = ‘-Bestyrelsen’;
    ?>

    In my my-hacks.php file (same directory as wp-config.php) removes all catagories from the frontpage!!!

    Where is the my-hacks file to be placed?
    What am I doing wrong?

    J;-)

    TechGnome

    @techgnome

    Moderator

    My notes:
    1) my-hacks.php goes in your blog root.
    2) regarding $cat = ‘-Bestyrelsen’; … Bestyrelsen should have been the CAT ID of the category, not the name.

    -tg

    TechGnome

    @techgnome

    Moderator

    Gah! Double posted by mistake. This one can be deleted.

    -tg

    Thanks, works like a charm now.

    Well it has worked like a charm for a long time. Now I have 2 catagories I don’t want to show on the frontpage.

    Using:
    <?php
    if ((empty($_GET[‘cat’]))&&(!preg_match(‘/wp-admin/’, $_SERVER[‘REQUEST_URI’]))) $cat = ‘-4, -5’;
    ?>

    Does not work. How do I prevent Cat 4 and 5 from showing up on the index page?

    Solved the problem:

    <?php
    if ((empty($_GET[‘cat’]))&&(!preg_match(‘/wp-admin/’, $_SERVER[‘REQUEST_URI’]))) $cat = ‘-4’;
    ?>

    Worked for one catagory (4). Making catagory 4 parent to catagory 5 solved my problem

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Need for a catagory that doesn’t show up on the frontpage’ is closed to new replies.
Skip to toolbar