Breadcrumbs link

Hi there, i have some custom code that you guys gave me in my functions.php to change ny blog post breadcrumbs to point back to a custom blog page i made which worked fine. I have since converted to x pro and now all posts including my product pages show the breadcrumb as ‘blog’ rather than ‘shop’.

Example: https://www.sandandseagulls.co.uk/product/summer-days-seagrass-shopper/

Here is the custom code that is currently in my functions file:

add_filter( ‘x_breadcrumbs_data’, ‘x_blog_breadcrumb’, 10, 2 );
function x_blog_breadcrumb($crumbs, $args){
$crumbs[1] = array(
‘type’ => ‘blog’,
‘url’ => get_permalink(7981),
‘label’ => $args[‘blog_label’],
);
return $crumbs;
}

Please can you provide an updated functions code to make this work properly with my product pages?

Thanks

Hi There,

Please check this thread for possible solution.

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.