WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] One hack cancels out the other Child/Parent cancels out catagory kill (3 posts)

  1. jthusgaard
    Member
    Posted 8 years ago #

    Hi

    I used a hack to hide a catagory from the frontpage. Then I hid other catagories by making the first catagory parent to the new (child catagories) and they to were hidden from the frontpage. Just like I wanted them to be.

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

    Catagories 5 and 6 were hidden by making them children to catagory 4.

    Then I discovered that I can see the child catagory posts on my parent catagory (myblog.com/?cat=4). And I desided that I dont like that.

    I implemented the code shown in this link: http://wordpress.org/support/topic/26049#post-195507 and it worked on the parent catagory..... But now my child catagory is showing on my frontpage, and I dont want that!

    * I want posts in cat 1, 2 and 3 to show on the frontpage.
    * I want posts cat's 1, 2 and 3 to have their own cat links ot their pages ie. /?cat=1
    * I don't want posts in cat 4, 5 and 6 to show on the front page cat 5 and 6 are children to cat 4
    * I want posts cat's 4, 5 and 6 to have their own cat links ot their pages ie. /?cat=1
    * I dont want posts in cat 5 and 6 to show up on /?cat=4

    Link to catagory away from frontpage: http://wordpress.org/support/topic/43922

    Link to Child out of parent catagory: http://wordpress.org/support/topic/26049#post-195507

    Is there anyway to make this work?

  2. jthusgaard
    Member
    Posted 8 years ago #

    No one knows the trouble I've seen, and apparantly no one knows how to solve my problem.

  3. jthusgaard
    Member
    Posted 7 years ago #

    I'm using this plugin now: http://ryowebsite.com/?p=46

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags