wordpress category help.....

8 replies
hello warriors,

I am using wordpress on my site Idiot Diets - Diet UK - slimming diet - diets that work - This is the best place to find great diet information, and I want to add more categories to the site, but when I add more it puts them in the menu that goes from left to right (i have added some test ones to see what i mean)

how do I stop this? I dont really want to be playing around with code... but will if I have to.

any plugins or anything?

Cheers

Danny
#category #wordpress
  • Profile picture of the author LMC
    Danny,

    Your looking for a little snipplet that says wp_list_categories in your menu navigation code, most likely on the index page. This snipplet is telling Wordpress to post your categories up in the menu bar. You can change this to wp_list_pages, to post pages such as About Me, Contact Us, etc...
    {{ DiscussionBoard.errors[1648244].message }}
  • Profile picture of the author CMCarlin
    LMC is correct. If you can't find it in 'index', try looking in 'header.php'. If you want to add a category later on, still use wp_list_pages and then install the 'blog in blog' addon.
    Signature
    I can help your business grow. Spend less time backlinking and more time focusing on your clients. Skype me anytime for more details. Custom packages available.
    {{ DiscussionBoard.errors[1648288].message }}
  • Profile picture of the author Danny Cutts
    Hmmm I am a little confused,

    I dont want to stop displaying all the categories I just want to display a few of them...

    Danny

    PS sorry I may have completly missunderstood your reply
    {{ DiscussionBoard.errors[1648317].message }}
  • Profile picture of the author KarlWarren
    This article should help... (see responses above, combined with the following article)

    Template Tags/wp list categories WordPress Codex
    Signature
    eCoverNinja - Sales Page Graphics & Layout Specialist
    {{ DiscussionBoard.errors[1648337].message }}
  • Profile picture of the author Danny Cutts
    or I can do this

    Hi,

    Usually the categories on the menu can be found at the header.php file in your theme folder.

    Find this:

    <?php wp_list_categories('title_li=') ?>

    Replace with:
    <?php wp_list_categories('exclude=6,43&title_li=') ?>

    This will exclude category 6 and 4 from the list. But you can change the category ID according to your requirement.

    Danny
    {{ DiscussionBoard.errors[1648639].message }}
  • Profile picture of the author Danny Cutts
    or I can do this

    Hi,

    Usually the categories on the menu can be found at the header.php file in your theme folder.

    Find this:

    <?php wp_list_categories('title_li=') ?>

    Replace with:
    <?php wp_list_categories('exclude=6,43&title_li=') ?>

    This will exclude category 6 and 4 from the list. But you can change the category ID according to your requirement.

    Danny
    {{ DiscussionBoard.errors[1648647].message }}
    • Profile picture of the author gman2319
      Danny ...a lot of themes nowadays come with an option to cut out the categories that you dont need. I hope you saw if that option is there, before you dive into the code. Basically you enter the category code there and it does the stuff for you.

      But it looks like u got the code fix for it. Should have worked!
      Signature

      My Signature..MY SIGNATURE!

      {{ DiscussionBoard.errors[1648671].message }}
  • Profile picture of the author Danny Cutts
    ah interesting thought I have looked in the settings and could not find it in the settings but would be handy in the future

    cheers

    Danny
    {{ DiscussionBoard.errors[1648732].message }}

Trending Topics