- This topic has 12 replies, 2 voices, and was last updated 5 years, 10 months ago by Andrew Misplon.
- AuthorPosts
- January 13, 2019 at 11:06 am #11508
LCHParticipantHow can I remove breadcrumbs in specific landing pages for esthetic purpose?
January 13, 2019 at 1:16 pm #11518
Andrew MisplonKeymasterHi LCH
Can you please, send a link to the page concerned so I can take a look.
January 13, 2019 at 1:57 pm #11519
LCHParticipantThis reply has been marked as private.January 13, 2019 at 2:00 pm #11520
Andrew MisplonKeymasterThanks for the link. Which plugin are you using for the breadcrumbs?
Breadcrumb NavXT has the options you’re looking for: https://wordpress.org/plugins/breadcrumb-navxt/.
January 13, 2019 at 3:02 pm #11521
LCHParticipantI’m using Yoast SEO. Is there any way to do that with Yoast?
January 13, 2019 at 3:13 pm #11522
Andrew MisplonKeymasterIām not sure if Yoast has the same granular settings but you can check them out.
Looks like you can set the post types for display. Scroll down at the above link to see where the settings are.
January 13, 2019 at 3:32 pm #11523
LCHParticipantI still cannot hide breadcrumbs on pages even with breadcrumb navxt. Can you show me the way to do that?
January 13, 2019 at 3:41 pm #11524
LCHParticipantIt seems that the theme polestar has already implemented the breadcrumb code for both Yoast and Breadcrumb Navxt. However, I cannot find the code in the theme files. If you can show me where it is, I might be able to choose where to show the breadcrumbs with a child theme.
January 13, 2019 at 3:50 pm #11533
Andrew MisplonKeymasterHi, I just sent this link https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/ so you could see where the Yoast settings are to be found for breadcrumbs.
You can insert the following into your child theme functions.php file:
if ( ! function_exists( 'polestar_breadcrumbs' ) ) : /** * Display Yoast SEO breadcrumbs or Breadcrumb NavXT below the header. */ function polestar_breadcrumbs() { if ( is_page() ) return; if ( function_exists( 'bcn_display' ) ) { ?><div class="breadcrumbs bcn"> <?php bcn_display(); ?> </div><?php } elseif ( function_exists( 'yoast_breadcrumb' ) ) { yoast_breadcrumb( '<div class="breadcrumbs">','</div>' ); } } endif; add_action( 'polestar_content_top', 'polestar_breadcrumbs' );
January 13, 2019 at 4:03 pm #11535
LCHParticipantI’m sorry but I lost you somewhere…
In the link you sent me, they said that the implementation code is often put in to single.php and/or page.php or header.php. But I can’t find any code like that in these files.January 13, 2019 at 4:08 pm #11536
Andrew MisplonKeymasterThe link I sent was only to show you where the Yoast SEO settings were.
“Looks like you can set the post types for display. Scroll down at the above link to see where the settings are.”
There is no need to insert code for Polestar, the integration code is already there.
Please, insert the function I provided above in your child theme functions.php file. I’ve included an early return in the function to exclude pages.
January 13, 2019 at 4:13 pm #11538
LCHParticipantIt works perfectly now, thank you very much.
January 13, 2019 at 4:15 pm #11539
Andrew MisplonKeymasterAwesome š Glad to hear that helped.
All the best.
- AuthorPosts
You must be logged in to reply to this topic.