ThemeShaper Forums » Thematic


adding categories to naviagation

(6 posts)
  • Started 12 years ago by greenandi
  • Latest reply from em hr
  • This topic is resolved
  1. hi team!

    does anyone know how to add categories list - this

    <?php wp_list_categories('orderby=id&use_desc_for_title=0&child_of=13'); ?>

    to the navigation, without editing or inset the wp's php code to the thematic's header-extension.php

    I wanted the 'categories link' as an 'li' tag, inside and part of div class:menu and ul class: sf-menu sf-js-enabled.

    i've been search every article about this, i found that some of them re-create/re-place the thematic_access default with their own using action function.

    Posted 12 years ago #
  2. I found this, posted by Devin ( -

    function add_childtheme_category_menu($args) {
    	$categories = wp_list_categories('orderby=id&use_desc_for_title=0&child_of=13');
    	$args .= $categories . '';
    	return $args;

    this works great but <li class=categories> shown above the <div class=menu>.

    does anyone how to make it works perfectly ?

    Posted 12 years ago #
  3. i did this, and thanks again Devin for the tips and the custom function - action

    i guessed i have to use custom function

    function childtheme_menu() { ?>
         <div class="menu">
              <ul class="sf-menu">
                    <?php wp_list_pages('title_li='); ?>
                    <?php wp_list_categories('exclude=1&title_li='); ?>
    <?php }
    Posted 12 years ago #
  4. :) I'm glad you worked it out thanks for taking the time to come back and share your solution.

    Posted 12 years ago #
  5. using function filter - again, from Devin

    function add_childtheme_category_menu($args) {
    	$categories = wp_list_categories('exclude=1&title_li=&echo=0');
    	$args .= $categories . '';
    	return $args;
    add_filter('wp_list_pages', 'add_childtheme_category_menu');

    more about menu navigation

    i'm still not to sure which one should i use...
    i just wanted to add the categories drop down list to the navigation menu with out editing the original thematic codes, re-create/re-place the codes using action function.
    both functions are works well. but for me, the action function is stable with complete control for showing or hiding the pages.

    Posted 12 years ago #
  6. I'm not realy understanding if you've solved your problem or not.

    Does either function action or filter accomplish you goal?

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.