Site logo

Archived topic

Error en menú secundario

7 replies · Started by Alejandro on August 4, 2022

Viewing posts 1–8 of 8

Buenas tardes,

nos hemos dado cuenta que el menú secundario cuando se navega en una categoría "A" de repente arriba la sección cambia el nombre a otra categoría "B".

Les dejamos un vídeo para que vean el problema: https://vimeo.com/736608652

Gracias

Hi there,

Are you using a plugin or custom function for the secondary navigation?

If so, can you share the code?

Hola Ying, mil gracias por la rápida respuesta y el buen soporte que me estáis brindando en esta migración de plantilla.

Si tengo algún CSS:

/* ocultar hamburguesa */
@media (max-width: 768px) {
button.menu-toggle.secondary-menu-toggle:before {
display: none;
}
}

__________

/*Menu secundario fijo al bajar*/

@media (max-width:600px){

/* Inside navigation */
#secondary-navigation .inside-navigation{
border-bottom-width:1px;
border-bottom-style:solid;
border-bottom-color:#dbdbdb;
}

/* Svg ocultar icono */
.secondary-menu-toggle .icon-menu-bars svg{
display:none;
}
#secondary-navigation .inside-navigation .mobile-menu{
word-spacing:10px;

}
/* FLECHA ABAJO CATEGORIA */
#secondary-navigation .inside-navigation .secondary-menu-toggle:after{
content: ' \276F';
display: inline-block;
transform: rotate(90deg);
margin-left:50% !important;

font-size:22px;
}
.mobile-menu-open #secondary-navigation .inside-navigation .secondary-menu-toggle:after{
display: none;

}

}

Are you using any PHP code for secondary navigation?

It's showing the current menu item as the menu toggle which is not default behavior.

En principio no tentemos ningún PHP sólo CSS para corregir ciertos aspectos del submenú.

Le doy acceso al panel con perfil administrador a ver si ve algo a mayores que no esté observando yo.

Muchas gracias:

You are using this custom function to make the secondary navigation label show the current category:
https://www.screencast.com/t/hyaEZEA4

Can you try to disable this function? Then go to appearance > elements, create a new hook element, add this code:

<script>jQuery(document).ready(function(){
    if(jQuery('#secondary-navigation li.current-menu-item  a').html())
        jQuery('.secondary-menu-toggle .mobile-menu').html(jQuery('#secondary-navigation li.current-menu-item  a').html());       
});</script>

Choose entire site as location, choose wp_foot as the hook.

Let me know if this works.

En efecto!

Muchísimas gracias Ying!!! Excelente soporte y muy amable.

Un saludo!

You are welcome :)

This archived topic is closed to new replies.