Assign menu appears in the SEO

Hi,

While analyzing my website SEO https://tarekrabaa.com the hidden menu “assign menu” is appearing as keyword in the SEO.

How to remove it.

I didn’t assign any menu.

Rgds

Hello @tarekr,

Thanks for asking. :slight_smile:

Can you please let us know the tool you are using to analyse SEO so we can take a closer look?

Thanks.

1 Like

https://www.seocentro.com/tools/search-engines/metatag-analyzer.html

for the URL https://tarekrabaa.com/issues/البرقية-المنقولة-303/

Hello @tarekr,

Thanks for sharing the necessary details. :slight_smile:

This will require template change. I suggest you to please setup a child theme. I am sharing relevant resources that you can use to download and install child theme.

Download child theme from here: https://theme.co/apex/child-themes
https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

After that add following code in child theme function.php file:

if ( ! function_exists( 'x_output_primary_navigation' ) ) :
  function x_output_primary_navigation() {

    if ( x_is_one_page_navigation() ) {

      wp_nav_menu( array(
        'menu'           => x_get_one_page_navigation_menu(),
        'theme_location' => 'primary',
        'container'      => false,
        'menu_class'     => 'x-nav x-nav-scrollspy',
        'link_before'    => '<span>',
        'link_after'     => '</span>'
      ) );

    } elseif ( has_nav_menu( 'primary' ) ) {

      wp_nav_menu( array(
        'theme_location' => 'primary',
        'container'      => false,
        'menu_class'     => 'x-nav',
        'link_before'    => '<span>',
        'link_after'     => '</span>'
      ) );

    } else {

      echo '<ul class="x-nav"><li><a href="' . home_url( '/' ) . 'wp-admin/nav-menus.php"></a></li></ul>';

    }

  }
endif;

Let us know how it goes.

Thanks.

1 Like

Thx it works.
I can still see another word which is “toggle the widgetbar”

Hello @tarekr,

Thanks for updating thread. :slight_smile:

Please add following code in child theme function.php file:

if ( ! function_exists( 'x_legacy_header_widget_areas' ) ) :
  function x_legacy_header_widget_areas() {

    $n = x_get_option( 'x_header_widget_areas' );

    if ( ! apply_filters( 'x_legacy_cranium_headers', true ) || $n == 0 || x_is_blank( 3 ) || x_is_blank( 6 ) || x_is_blank( 7 ) || x_is_blank( 8 ) ) {
      return;
    }

    ?>

    <div id="x-widgetbar" class="x-widgetbar x-collapsed" data-x-toggleable="x-widgetbar" data-x-toggle-collapse="1" aria-hidden="true" aria-labelledby="x-btn-widgetbar">
      <div class="x-widgetbar-inner">
        <div class="x-container max width">

          <?php

          $i = 0; while ( $i < $n ) : $i++;

            $last = ( $i == $n ) ? ' last' : '';

            echo '<div class="x-column x-md x-1-' . $n . $last . '">';
              dynamic_sidebar( 'header-' . $i );
            echo '</div>';

          endwhile;

          ?>

        </div>
      </div>
    </div>

    <a href="#" id="x-btn-widgetbar" class="x-btn-widgetbar collapsed" data-x-toggle="collapse-b" data-x-toggleable="x-widgetbar" aria-selected="false" aria-expanded="false" aria-controls="x-widgetbar">
      <i class="x-icon-plus-circle" data-x-icon="&#xf055;"><span class="visually-hidden"><?php _e( '', '__x__' ); ?></span></i>
    </a>

    <?php

  }
  add_action( 'x_after_site_end', 'x_legacy_header_widget_areas' );
endif;

Thanks.

1 Like

many thx.
It woks also. The issue solved.

You’re welcome!
Thanks for letting us know that it has worked for you.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.