WordPress.org

Support

Support » Plugins and Hacks » Bogo » [Resolved] English (main) menu not showing

[Resolved] English (main) menu not showing

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    @takayukister

    It has nothing to do with Bogo plugin. The theme you use doesn’t apply proper style to the nav menu. Try switching to another theme.

    Solved. in mer registration at function.php i change it to

    /* Register Menu */
    function register_menu() {
      register_nav_menu('en_US_primary-menu', __('Primary Menu EN', 'stag'));
      register_nav_menu('id_ID_primary-menu', __('Primary Menu ID', 'stag'));
      register_nav_menu('ms_MY_primary-menu', __('Primary Menu MY', 'stag'));
    }
    
    add_action('init', 'register_menu');
    
    function add_language_prefix($menu_identifier) {
        global $post;
        $language_prefix = get_post_meta( $post->ID, '_locale', true );
        return $language_prefix . '_' . $menu_identifier;
    }
    add_filter('language_prefix_menu', 'add_language_prefix');

    and in header I add this

    <nav id="navigation" role="navigation" class="clearfix">
    
        <?php
          if(has_nav_menu('primary-menu')){
            wp_nav_menu(array(
              'theme_location' => apply_filters( 'language_prefix_menu', 'primary-menu'),
              'container' => 'menu-primary-container',
              'items_wrap'      => '<ul id="primary-menu" class="%2$s">%3$s</ul>',
              ));
          }
        ?>

    good plugin Mr. Takayuki

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] English (main) menu not showing’ is closed to new replies.
Skip to toolbar