HowTo Add a Category Menu in Thesis

Published On :

A Couple of weeks ago I did a Comparison between Thesis v/s Genesis v/s Swift & I found Thesis to be superior between the other two. But as I had mentioned in that post, Thesis still lags behind in terms of the basic design.

So I decided to design the theme of DailyBlogging myself. While designing & customizing our new theme, I found that we need to manually add certain things in order to make a rocking blog theme.

One of the most important aspect of a blog is the Category Menu. By default thesis only provides us to add categories in the Main Nav Menu. But if we need to add a custom & separate menu specifically for Categories, then it’s a bit of a code work.

Category Menu Thesis

For adding a Category menu right below your Site’s logo, Just navigate to your Thesis theme’s directory folder, then goto the folder named ‘custom’ and edit the custom_functions.php file. Add the below code in that file.

function categories_menu() { ?>
<ul class="menu">
<?php wp_list_categories('title_li=&orderby=id&number=10&exclude=1') ?>
<?php }

Here categories_menu in the first line defines the function & inside it; is the real content/body part of the function. The second line assigns a class named menu for the <ul> tag. This is mainly for styling purpose & it styles your Category nav same as the Main Nav Menu. Third line of this code contains the main PHP function with which WordPress filters which categories to display in the Category nav menu & which not to. The fifth & the sixth line is the thesis hook to display our categories_menu below/after the header function.

Subscribe to Our RSS Feeds / Daily Updates as I will be coming up with more such Thesis Tutorials.

Did this tutorial help you to add a Category Navigation Menu ??

Share :
Tagged as : 13 Comments
About » Has written 231 Post(s) «

I'm a Web Designer/Developer, SEO'er and a Blogger who gives a few Blogging Tips in the form of posts/tutorials. Follow & Subscribe to my Blog if you feel it's worth it.


13 Comments Comments RSS

  1. #

    Thanks for sharing.

  2. #

    I am very new with Thesis framework. Thanks for putting up this tutorial. I might not need to do this now but later it will be useful for me. :)

  3. #

    Thanks for the tips

  4. #

    Thanks for this helpful post

  5. #

    The code hack looks great, simple and I am sure it will work well. I don’t use Thesis theme but I have heard a lot of good words about them!

  6. #

    Thanks for this Tutorial Mani…I am new to thesis as…. Nice Design of your Site.. :)

  7. #

    Thanks mate,another useful post.

  8. #

    Thank you for this tutorial. It is by far the most simple and effective I’ve read on how to add that extra, most needed, navigation bar.

    Works as supposed without any problems at all.

    GREAT :)


  9. #

    Is there a way you can have the category menu have drop downs if your categories have child categories?

  10. #

    Really mate its very useful but if you had provided style sheet for it then it would be more beneficial and fruitful.

  11. #

    Great tutorial.
    I’ve added the code to my custom functions, and this is working good although; what do I change in the third line of code to choose which category to display and which not to display?

    Thanks, Mark

  12. #

    Hi – how can I centre it? Thanks!

Post a Comment

Your email is never published nor shared. Required fields are marked *

Also, use your Real name in the 'Name' field. Comment names with only keywords will be trashed.