The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. jthusgaard
    Posted 10 years ago #


    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:

    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.


  2. moshu
    Posted 10 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
    Posted 10 years ago #

    WOW that is a cool plugin.

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


Topic Closed

This topic has been closed to new replies.

About this Topic