Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Getting yoast breadcrumbs to display properly

Home / Forums / Ascend Theme / Getting yoast breadcrumbs to display properly

This topic is: Resolved
[Resolved]
Posted in: Ascend Theme
Anonymous
August 15, 2019 at 2:17 pm

Hi

I am using yoast breadcrumbs and have added the following to my functions.php in my child theme:

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

But that only seems to affects products.

To get the breadcrumbs working on my pages, I have added the following to page.php

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

And I cannot get it to work on blog posts at all.

Question – is there code I can add to functions.php that will show breadcrumbs on products, posts AND pages? Or is adding it in separate places the right way to go?

If so, can you advise which file I need to add code to in order for breadcrumbs to show up on my posts?

Finally, to style them, do I just need to add the following to my css (or is it a different class)?

.breadcrumbs {
<style>
}

Many thanks
Dom

  • The forum ‘Ascend Theme’ is closed to new topics and replies.