WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Not on the frontpage but on the sidebar (my-hacks.php) (3 posts)

  1. jthusgaard
    Member
    Posted 7 years ago #

    Hi

    I'm using WP on this homepage: http://baby.gjesager.dk

    I needed two catagories to be hidden from the frontpage (2 and 13) so I use this hack:

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

    And made catagorie 2 parent to catagorie 13. This solved my problem.

    But now I need to make catagorie 13 show on the side bar, along with the other catagories.

    Catagorie 2 is to be shown as it is today as a link under Gaestebog.

    Solutions without my-hacks.php are very welcome.

    j;-)

  2. moshu
    Member
    Posted 7 years ago #

    Why don't you use a plugin to hide categories on the frontpage? That still will let you display them (as a link) in the sidebar)
    e.g. http://ryowebsite.com/?p=46

  3. jthusgaard
    Member
    Posted 7 years ago #

    WOW that is a cool plugin.

    I'll use it on at least 2 more sites.
    Thanks a lot.

    j;-)

Topic Closed

This topic has been closed to new replies.

About this Topic