WordPress.org

Ready to get started?Download WordPress

Forums

Categories like sub-pages in menu (8 posts)

  1. Robert
    Member
    Posted 4 years ago #

    I'd like to list my categories like sub-pages with Home. How can I do that? The code for the menu is:

    <div id="navbar" class="clearfloat">
    <ul id="page-bar" class="left clearfloat">
    <li><a href="<?php echo get_option('home'); ?>/">Home</a></li>
    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>
    </ul>

    Thanks in advance!

  2. MichaelH
    Member
    Posted 4 years ago #

    Probably want to use the template tag, wp_list_categories().

    The theme, Amazing Grace uses both categories and pages for navigation.

  3. Robert
    Member
    Posted 4 years ago #

    Yes, probably, but how to list the categories as a list below the 'Home'-button?

    If I do this:
    <?php wp_list_categories('show_option_all=Home&title_li=&exclude=4'); ?>
    I get a menu item "Home" reffering to the home-page and I see the categories in the menu, but not "dropping down".

    If I do this:
    <?php wp_list_categories('show_option_all=&title_li=Test&exclude=4'); ?>
    there's an item called "Test" and if I mouse-over there, the categories drop down. Almost perfect, but the item "Test" has a different style then the other buttons (to pages and to the standard Home-link (from my previous post)).

    <?php wp_list_categories('show_option_all=Home&title_li=Test&exclude=4'); ?>
    is the same, including the "Home" button in the list.

    I think I only have to fix the style of "Test", but how? And I prefer "Test" to have a link like "Home" to the home-page..

  4. MichaelH
    Member
    Posted 4 years ago #

  5. Robert
    Member
    Posted 4 years ago #

    No, I don't mean such a drop-down menu. I'd like the categories to appear like pages (with subpages) in my menu.
    I'm using arthemia by the way.

  6. MichaelH
    Member
    Posted 4 years ago #

  7. Robert
    Member
    Posted 4 years ago #

    Isn't there an easier way?
    Here's the page. Hover the mouse between "voorpagina" and "over" (the above side of the "invisible" space). I only have to have the style of the text of that block the same as the other buttons.

  8. Robert
    Member
    Posted 4 years ago #

    ...but don't know how to do that exactly.

Topic Closed

This topic has been closed to new replies.

About this Topic