• Hello,

    I am coding a WP theme from the HTML of a ThemeForest page: Theme can be seen Here

    Link to the WordPress theme I’m working on: https://wp-developers.com/agentdavo/

    Link to the Static HTML created by ThemeForest: https://wp-developers.com/test_html

    For the top navigation menu, I am using the following:

    functions.php:

    <?
    //add dynamic menu
    
    add_action( 'init', 'register_my_menus' );
    
    function register_my_menus() {
    	register_nav_menus(
    		array(
    			'primary-menu' => __( 'Primary Menu' ),
    			'secondary-menu' => __( 'Secondary Menu' ),
    			'tertiary-menu' => __( 'Tertiary Menu' )
    		)
    	);
    }
    ?>

    header.php:
    <?php wp_nav_menu(array('theme_location' => 'primary-menu', 'container_id' => 'navigation', 'menu_class' => 'slidemenu1')); ?>

    As you can see – I am passing an argument for the menu to use the class slidemenu1 – this is the class that this layout originally uses.

    My problem, is with submenu display – If you look at the origional layout, you will see it uses: class=”subnav” for styling submenus ( you can see a static version of the original here on my server here ).

    Similar to how I passed an argument in wp_nav_menu to use the menu_class slidemenul – is it possible for me to set the submenu class?

    What is the best way to do this without having to change all of the original css around WordPress generated output.

    Thanks in advance,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Make 3.0 submenu use custom class’ is closed to new replies.