WordPress.org

Forums

zAlive
[resolved] Sub Sub Nav Items? (10 posts)

  1. kirkbross
    Member
    Posted 2 years ago #

    Does zalive theme support nav ul li ul li ul li ? Secondary dropdown/flyout list items?

    I am using the zalive them and have created a menu and assigned it to the top nav. For some reason pages two levels in aren't showing in the drop down. For example:

    Page 1
    >Child of Page 1
    >>Item under child
    >>Item under child

    In my menu editor, it looks like all the pages are laid out correctly, i.e., everything is indented and say Sub.

    Thoughts?

  2. Jesin A
    Member
    Posted 2 years ago #

    This theme's menu has been hard coded with a "depth" of 2 which is why isn't displaying the 3rd level.

    You'll have to modify /wp-content/themes/zalive/template/header.php file find wp_nav_menu and change the depth to 3 like this

    wp_nav_menu( array('theme_location' => 'top_nav_menu', 'container' => '','depth' => 3 ,'items_wrap' => '%3$s' ) );

    Then you have to edit the /wp-content/themes/zalive/js/function.js file and on line 7 change

    $('#header .nav>li:has(ul)').each(function(){

    to

    $('#header .nav>li:has(ul), #header .sub-menu>li:has(ul)').each(function(){

    All these changes will be lost when you update this theme. So you'll have to create a child theme, activate it and add the following in its functions.php

    <?php
    add_filter( 'wp_nav_menu_args', 'change_menu_depth', 10, 1);
    
    function change_menu_depth( $args )
    {
    if( $args['theme_location']  == 'top_nav_menu' )
    $args['depth'] = 3;
    return $args;
    }

    Similarly you'll have to "dequeue" the function.js script and enqueue the modified one.

    Hope this theme's author increases the menu depth in the next release.

  3. kirkbross
    Member
    Posted 2 years ago #

    Thanks Jesin... I was able to successfully make those changes, but I've decided to just design the nav with one level. The CSS for the grandchildren items would require a bunch of tweaking and I didn't feel like getting into it. But this is good to know for the future. -Kirk

  4. Newbie75
    Member
    Posted 2 years ago #

    Hi,

    The posts before helped very much. Thank you!
    There's only one thing:
    In this theme is it possible to position the 3rd level top nav menue (Items of Child 1) at the right side of each second level menue (Child of page 1)?

    Now using hover, the 3rd level lays over the 2nd level menue.
    -Newbie75 (WordPress 3.8 with theme zAlive)

  5. kongojole
    Member
    Posted 2 years ago #

    Hi members. Am using zAlive them i get a problem to find the title tag in header.php.
    Or if any one know how to configure WordPress SEO by yoast in zAlive theme Pls help me.

  6. specialdesigns
    Member
    Posted 1 year ago #

    @Jesin A
    your help was precious but i still have a small problem here.
    I followed your instructions but the third menu is not shift to the right.
    Is there any code i can fix this ??

    To see what i mean check the top menu of url:
    http://www.seners.gr/wordpress/

  7. kirkbross
    Member
    Posted 1 year ago #

    @specialdesigns

    Find this in your CSS:

    .sub-menu ul

    Change position to absolute and add top and left values... like this:

    .sub-menu ul {
    position: absolute;
    top:0;
    left:180px;
    }
  8. specialdesigns
    Member
    Posted 1 year ago #

    there is no code like this (or similar) inside Style.css

  9. kirkbross
    Member
    Posted 1 year ago #

    @specialdesigns...

    Search the style.css page for this exact string

    .sub-menu ul

    It must be in there somewhere... if not, just add it at the bottom of the file.

    .sub-menu ul {
    position: absolute;
    top:0;
    left:180px;
    }
  10. specialdesigns
    Member
    Posted 1 year ago #

    yeap it works

    thanks kirkbross

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic