WordPress.org

Ready to get started?Download WordPress

Forums

Dropdown Menus
[resolved] How and where to include? (4 posts)

  1. johanna2patricia
    Member
    Posted 1 year ago #

    Hi,
    I am trying to implement the dropdown menu in a theme.
    The widget function works.
    But I want it to display in the headerbar as a dropdown.
    When I insert this code in the functions.php I get an error.
    `<?php
    if ( ! function_exists( 'dropdown_menu' ) )
    include( 'dropdown-menus/dropdown-menus.php' );
    ?>
    What am I doing wrong?
    What code and where do I insert?
    My testpage:

    Johanna

    http://wordpress.org/extend/plugins/dropdown-menus/

  2. growdigital
    Member
    Posted 1 year ago #

    From my very limited understanding, you call the function like this:

    <?php
      dropdown_menu( array(
          'theme_location' => 'main-mobile',
          'dropdown_title' => 'MENU',
          'indent_string' => '- ',
      ) );
    ?>

    The main-mobile is the name you give your menu in the WordPress Appearance > Menus.

    hth, Jake

  3. johanna2patricia
    Member
    Posted 1 year ago #

    Thanks Jake!
    In the meantime I found another dropdown menu and got hat to work.

    Johanna

  4. a4jp.com
    Member
    Posted 1 year ago #

    johanna2patricia which plugin did you end up using?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic