• I am using the Techland theme and want to change the navigation bar menu buttons so that they link to categories instead of static pages. Is this possible and if so how do I change it to do this please?

    Many Thanks
    SC

Viewing 4 replies - 1 through 4 (of 4 total)
  • Look for <? wp_list_categories(‘sort_column=menu_order&title_li=’); ?>
    wp_list_pages in your header.php and change it to wp_list_categories

    Hope that helps!

    Thread Starter screentan

    (@screentan)

    That’s awesome thanks! I guess there isn’t a way to have a combination of links to static pages and categories on the menu bar is there? i.e. what if I wanted the majority of the menu buttons to link to static pages but just one of the menu buttons to link to a category instead. Is this possible at all?

    If it’s just one, I’d suggest coding it the old-fashioned way. Lets say you hay your menu in a div with id=”menu”. Your code would be something along the lines of:

    <div id="menu>
    <ul>
    <?php wp_list_pages('sort_column=menu_order&amp;title_li=';?>
    </ul>
    </div>

    you could just add the category link like

    <li><a href="yoursite.com/category">Category</a></li>

    So it would look something like this:

    <div id="menu>
    <ul>
    <?php wp_list_pages('sort_column=menu_order&amp;title_li=';?>
    <li><a href="yoursite.com/category">Category</a></li>
    </ul>
    </div>

    The other option is to just use <?php wp_list_categories(sort_column=menu_order&amp;title_li=&amp;exclude=X,Y,Z'): ?> Where you exclude every cat except for the one(s) you want to show.

    Thread Starter screentan

    (@screentan)

    This is a great help. Thanks so much for helping this total newb!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing Navigation Bar Links’ is closed to new replies.