Upgraded to WordPress 6.0 and have issues? Please check the hotfix which you need to apply.

Okay
  Public Ticket #2508484
How to replace the default breadcrumbs in Title Bar with Yost Breadcrumbs?
Closed

Comments

  •  1
    RJ started the conversation

    We need to replace the default breadcrumbs in the Title Bar with Yost Breadcrumbs, without rewriting the template if possible. Is it possible to do this by adding custom code to the function.php in the child theme? Thanks

  •  101
    FlexiPress replied

    Hello,

    All you need to do is replace line 133 of wp-content/themes/housico/includes/functions.php:

    <?php housico_breadcrumbs(); ?>

    with the following:

    <?php
        if ( function_exists( 'yoast_breadcrumb' ) ) {
            yoast_breadcrumb( '<div class="breadcrumbs">', '</div>' );
        }
    ?>

    Kind regards,


    FlexiPress Support

    Follow on     Envato     Facebook     Twitter

  •  1
    RJ replied

    This is what we ourselves did earlier as the most obvious step. But with each update of the template, you will have to do it again. We were interested in a way to do this dynamically, by means of a custom function in a child theme.

  •   FlexiPress replied privately
  •   RJ replied privately
  •  101
    FlexiPress replied

    Hi,

    We fixed that for you by adding the following function in your child theme:

    // Use Yoast breadcrumbs insteand of default theme breadcrumbs
    if ( ! function_exists( 'housico_breadcrumbs' ) ) {
    function housico_breadcrumbs() {
    if ( function_exists( 'yoast_breadcrumb' ) ) {
    yoast_breadcrumb( '<div class="breadcrumbs">', '</div>' );
    }
    }
    }

    Please check and let us know if you have any further questions.

    Kind regards,


    FlexiPress Support

    Follow on     Envato     Facebook     Twitter

  •   RJ replied privately
  •  101
    FlexiPress replied

    You're more than welcome!


    FlexiPress Support

    Follow on     Envato     Facebook     Twitter

  •   RJ replied privately