Forums

Make a CMS like main-menu and sub-menu (3 posts)

  1. Arnii
    Member
    Posted 3 years ago #

    Hi community!

    I'm building a CMS based on WP. One thing I can't make happen is my menu... Probably it's very simple, but I can't figure it out.

    Simply, I want a main-menu with categories and pages in one list. When a category is clicked, I want a new list to appear with the sub-menu in (sub-categories)

    You can take a look at my demo; my demo

    It's almost there, but when the sub-menu-item "Office" is clicked, the wholæe sub-menu disappears!

    As it is now, I'm using this code;

    <div class="grid_10" id="topMenu">
    <ul>
    <?php wp_list_categories('depth=1&sort_column=menu_order&title_li='); ?>
    </ul>
    <div class="clear"></div>
    </div><!--topMenu-->
    
    <div class="grid_10" id="subMenu">
    <ul>
    <?php if (is_category()) {
    $this_category = get_category($cat);
    if (get_category_children($this_category->cat_ID) != "") {
    echo "";
    echo "";
    wp_list_categories('orderby=id&show_count=0&title_li=
    &use_desc_for_title=1&child_of='.$this_category->cat_ID);
    echo "";}} ?>
    </ul>
    <div class="clear"></div>
    </div><!--subMenu-->

    I know the sub-menu disappears cause the code looks for the children of the sub-menu-item. But I can't figure it out...

    Any help is appriciated...

    Arnii

  2. groundfresh
    Member
    Posted 3 years ago #

    Arnii.. it looks like you figured this out.

    may I ask HOW?

    and the site is BEAUTIFUL.

    James
    http://www.groundfresh.net

  3. ali_reza_nazari
    Member
    Posted 3 years ago #

    you can also use my site to make your MENU online and dynamic and faster,
    why?
    my site make an external java code and it download only once and until user dont press F5 in browser
    http://www.cms4menu.ir
    menu in this site maked by own
    if you want to have one
    please contact me ADMIN@CMS4MENU.IR and i make for free
    ---
    best regurds
    nazari

Topic Closed

This topic has been closed to new replies.

About this Topic