How to add Yoast breadcrumb in post when disabling Page Title
-
URL:https://www.techandq.com/types-of-stacking-chairs/
I would like to know how to add Yoast SEO Breadcrumb to post by editing child theme or function.php if I disable Page Title.
Please check the Image
for the location I want to place breadcrumb on.
I already have the code of Yoast SEO breadcrumb, just need to know how to add it to post module.
Attachments:
You must be
logged in to view attached files.
Yoast SEO breadcrumb code:
<?php
if ( function_exists(‘yoast_breadcrumb’) ) {
yoast_breadcrumb( ‘<p id=”breadcrumbs”>’,'</p>’ );
}
?>
Hello,
In order to show breadcrumbs under the blog title, you need to go to your theme folder and copy the “content.php” file (woodmart\content.php) to your child theme (woodmart-child\content.php).
Paste this code under the condition woodmart_loop_prop( 'parts_meta' )
in the content.php file in your child theme.
https://monosnap.com/file/pczMthFaZdbD6u2s9UDSGONlqsImdu
To show breadcrumbs after the image, paste this code after the <header>
tag in the content.php file in your child theme.
https://monosnap.com/file/HwtYsMlDoddrYxi1xcos5AgqmhiEWB
<?php
if ( is_single() && function_exists( 'yoast_breadcrumb' ) ) {
echo '<div class="yoast-breadcrumb">';
echo '<p>';
echo yoast_breadcrumb();
echo '</p>';
echo '</div>';
}
?>
https://gyazo.com/17751c3772e73b6e01fb0918982c8da5
https://gyazo.com/2b07d7e43573fcac6095f0572d9624ea
Kind Regards
Get it and it do work, thanks a lot. You can mark this ticket as solved.
Hello,
We are glad that your issue has been resolved.
Let us know if there’s anything else we can do for you! You can always reach us at any time.
Have a wonderful day.
Kind Regards
The topic ‘How to add Yoast breadcrumb in post when disabling Page Title’ is closed to new replies.