Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43619
    Karen Williams
    Guest

    I am currently using Yoast and Calloway theme. I would like to add breadcrumbs but there is no header.php file to add the following code. <?php
    if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb( ‘<p id=”breadcrumbs”>’,'</p>’ );
    }
    ?>

    How can I add yeast breadcrumbs to Calloway since there is no header.php file?

    #43630
    Brandon C
    Keymaster

    Hi Karen,

     

    Thank you for you question and thanks for using Calloway Theme for WordPress!
     
    Normally Yoast Breadcrumbs work out of the box but if you need to add the functionality to your theme you can by using a plugin like Code Snippets to add custom php and run it on your site.

    We found that this snippet works well for adding breadcrumbs:
     

    add_action( 'boldgrid_header_bottom', function() {
    	if ( function_exists('yoast_breadcrumb') ) {
    		yoast_breadcrumb( '<div class="container"><p id="breadcrumbs">','</p></div>' );
    	}
    });

     

    If you’re looking for a theme that you can customize breadcrumbs without using any code, I recommend checking out our newest theme Crio. Crio fully integrates with the BoldGrid Post and Page Builder plugin giving you a wide array of customization options.

    I hope this helps! Please let us know if you need further assistance.

    #43638
    Karen Williams
    Guest

    Thank you so much for your reply. If I do not want to use the snippets plugin, can I put this code at the end of functions.php file or should it go somewhere else?

    #43645
    Brandon C
    Keymaster

    You’re so welcome. Yes you can include this snippet in your functions.php or a theme template file if you would like.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How Can I Add breadcrumbs to My Calloway WordPress Theme?’ is closed to new replies.