Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter melputnam

    (@melputnam)

    forgot to give you my url: https://claytreese.com/WP/

    Thread Starter melputnam

    (@melputnam)

    adding the custom menu also seemed to nullify the fixed positioning at the top of the page…

    Plugin Author rfgoetz

    (@rfgoetz)

    I believe that you need to create a custom walker (see https://codex.www.ads-software.com/Function_Reference/wp_nav_menu) in order to change the menu to horizontal.

    I’ve made a fancier, horizontal menu by copying the walker code from my Theme into the wp_nav_menu function.

    It is not my expertise…though.

    Bob

    Thread Starter melputnam

    (@melputnam)

    Thanks for your reply. I’ll check into that. The bigger issue is that the correct menu is not being recognized. The plug in is displaying the main menu, not the new custom top bar menu I created.

    Any suggestions?

    Plugin Author rfgoetz

    (@rfgoetz)

    Can you confirm that you selected the menu you created with the drop down box under theme locations on Menu | Appearance ?

    That tells WordPress to use your custom menu on the new location that you created in your functions.php file.

    Bob

    Thread Starter melputnam

    (@melputnam)

    yes sir

    Plugin Author rfgoetz

    (@rfgoetz)

    I am on a plane heading home. Can you email me screen shots of the custom php page and the appearance | menu tab? My email address is found in the wp-topbar.php file.

    Plugin Author rfgoetz

    (@rfgoetz)

    Got them. I need to change the FAQ to give better instructions. I’ll update in v. 5.01

    The issue is that the ‘menu’ name below must MATCH what the Menu name you created on the Appearance | Menu tab.

    So, if you new menu is named “Translation” – here is the code you need:

    $defaults = array(
    ‘menu’ => ‘Translation’,
    ‘menu_class’ => ‘wptb-menu-class’,
    ‘container_class’ => ‘wptb-container-class’,
    ‘echo’ => 0
    );
    $menu = wp_nav_menu( $defaults);
    echo preg_replace(“/\r\n|\r|\n/”,”,$menu);

    Thread Starter melputnam

    (@melputnam)

    That worked. Thanks so much for the fix and the excellent plug-in.

    Now I just need to work out the vertical menu…oh boy.

    Plugin Author rfgoetz

    (@rfgoetz)

    Thanks – .. if you like the plugin, pls give a positive review!

    …..

    Here is the replacement FAQ that will go into version 5.01:

    Create a new menu via the standard WordPress Appearance | Menu. Name it something unique, say “Translation”, to create the menu use the PHP Option (“Before” or “After” – your choice)… using this code:

    $defaults = array(
       'menu' => 'Translation',
       'menu_class' => 'wptb-menu-class',
       'container_class' => 'wptb-container-class',
       'echo' => 0
    );
    $menu = wp_nav_menu( $defaults);
    echo preg_replace("/\r\n|\r|\n/",'',$menu);

    Then style using .wptb-menu-class or .wptb-container-class (whichever you prefer.)

    To make the Menu fancy, you might need to create a custom walker (see https://codex.www.ads-software.com/Function_Reference/wp_nav_menu) on all the gory details on this WordPress function.

    Plugin Author rfgoetz

    (@rfgoetz)

    I just pushed 5.01 with the FAQ changes and a few defect fixes.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘top bar menu’ is closed to new replies.