Cambio titulo migas de pan

#152690
  • Resolved Selen Estier
    Rank Math free

    Hola buenas noches

    El motivo de mi consulta es que estoy usando las migas de pan por defecto del plugging rank math, veo que el título lo coge del h1 pero el problema es que tengo títulos muy largos y no queda efectivo, me gustaría más coger la miga de pan del slug, para eso existe un código donde pueda solicitar que coja el slug en vez del título?
    O desde la configuración del plugging se puede establecer?

    Llevo muchas horas dándole vueltas al asunto y no quiero tocar por mi cuenta no sea que me cargue el funcionamiento.

    Muchas gracias

    Un saludo

Viewing 5 replies - 1 through 5 (of 5 total)
  • Anas
    Rank Math business

    Hello,

    Thank you for contacting Rank Math, and sorry for any inconvenience caused.

    You will have to use some custom code using our API, where you could modify the breadcrumbs as you want (but you need to know a little about coding). This is the snippet you should use as a start:

    /**
     * Allow changing or removing the Breadcrumb items
     *
     * @param array       $crumbs The crumbs array.
     * @param Breadcrumbs $this   Current breadcrumb object.
     */
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	return $crumbs;
    }, 10, 2);

    I hope this helps. Looking forward to helping you.

    Muchas gracias por su respuesta.

    Sabe más o menos donde se encuentra el código que llama para añadir las migas de pan?
    En qué fichero puedo encontrarlo?

    Hello,

    Thank you for following up.

    The filter should be added in your theme’s functions.php file to work.

    You can also easily change the Title in the Advanced Tab using this option:
    Rank Math Breadcrumbs

    If it’s not showing in your editor, please make sure your Rank Math is already set to Advanced Mode in Rank Math > Dashboard
    Easy to Advanced Mode

    I hope that helps. Thank you, and looking forward to your update.

    muchas gracias, probaré a poner en código pero en un inicio comenzaré poniéndolo manualmente.

    gracias por su atención

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Cambio titulo migas de pan’ is closed to new replies.