Forums

Separating category links into sections (5 posts)

  1. jaymorris
    Member
    Posted 3 years ago #

    I want to break up my Category links into different sections. For example, I have 5 links under “Categories” which are Football, Baseball, Basketball, Weight Training, and Running. Instead of having all these under the “Categories” heading I would like to break them up as below. Is this possible to do?

    Sports (This would be a heading not a link)
    - Football
    - Baseball
    - Basketball

    Training (This would be a heading not a link)
    - Weight Training
    - Running

  2. whooami
    Member
    Posted 3 years ago #

    yes.

    Make 'Sports' and 'Training' normal categories.

    Make 'Football', 'Baseball', and 'Basketball' sub-categories of 'Sports' .. so on.

    You can do all of that in your manage > Categories screen.

    Its a little backward, as you assign parents, rather than children, but you'll get the drift once you look.

  3. jaymorris
    Member
    Posted 3 years ago #

    I would like Sports and Training not to be links. I would like them to be Headings like the current default "Categories" Heading.

  4. whooami
    Member
    Posted 3 years ago #

    do you want them as categories also? or no? Just headers? it makes a difference.

    You can exclude categories from showing and you can use wp_list_cats more than once.

    See http://codex.wordpress.org/Template_Tags/wp_list_cats

    If you dont want those top 2 items to be categories ALSO, then I would just hardcode that into your sidebar or wherever your using it, and call wp_list_cats twice using the options to display what you want.

  5. jaymorris
    Member
    Posted 3 years ago #

    I didnt think about hard coding the categories. This is a good idea. I will just add the links and heading to the side bar. Thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.