Community Forums › Forums › General Genesis Framework Discussions › How to NOT Display Titles In Breadcrumbs
Tagged: breadcrumbs
- This topic has 7 replies, 5 voices, and was last updated 2 months, 4 weeks ago by
lonzobrown.
-
AuthorPosts
-
August 12, 2024 at 1:27 am #508359
Regev
ParticipantThere's a clash of interest on my website:
I want text-rich H1 titles for both SEO and user engagement purposes.
I want easy breadcrumb navigation for a less cluttered UX.Unfortunately, currently the breadcrumbs pull the H1 title text and display it.
Is there any way (without a plugin, if possible) to achieve that? I suppose maybe adding a custom field on each post ("Breadcrumb Trail:"), and show that text up in the breadcrumbs instead of the H1 title.
Help much appreciated,
ThanksAugust 12, 2024 at 2:53 am #508360Regev
ParticipantChatGPT recommended simply adding this in functions.php:
// Customize breadcrumb title add_filter('genesis_breadcrumb_args', 'custom_breadcrumb_args'); function custom_breadcrumb_args($args) { if (is_single() || is_page()) { global $post; $breadcrumb_text = get_post_meta($post->ID, 'breadcrumb_text', true); if ($breadcrumb_text) { $args['labels']['singular'] = $breadcrumb_text; } } return $args; }
And then adding a breadcrumb_text Custom Field on each page and filling it. Is that the best solution?
August 12, 2024 at 8:07 am #508361Regev
ParticipantDoesn't work tho. tried this as well, also doesnt work:
add_filter('genesis_breadcrumb_args', 'custom_breadcrumb_args', 20); function custom_breadcrumb_args($args) { if (is_singular()) { global $post; $breadcrumb_text = get_post_meta($post->ID, '_genesis_single_title', true); if (!empty($breadcrumb_text)) { $args['labels']['current'] = $breadcrumb_text; } } return $args; }
August 16, 2024 at 7:53 pm #508379AnitaC
KeymasterAre you using an SEO plugin now? Is one active on your site? I know with Yoast you can customize the breadcrumb title.
Need help with customization or troubleshooting? Reach out to me.
August 21, 2024 at 9:57 am #508391Regev
ParticipantI used Yoast in the past. They had a bug where your breadcrumbs wouldnt be displayed properly (So instead of Home --> Themes --> Authority Pro, it would show Home --> Authority Pro --> Themes). Millions of websites got hit because of the SEO mess it caused, and they only fixed it after like half a year. I don't trust Yoast ever since, and am using SEO Framework, which is way cleaner as well.
November 28, 2024 at 5:22 am #508637brycejune
ParticipantHi Regev,
Hope so you're doing well, you can achieve this by customizing your theme’s breadcrumb function. Add a custom field for "Breadcrumb Trail" and modify the breadcrumb PHP code to display the custom field value instead of the H1 title. This way, you can keep your H1 titles text-rich for SEO, while using a different text in the breadcrumb for better UX.
Hope so this will work with script!
Cheers,
Bryce JuneJanuary 31, 2025 at 6:21 am #509068mickalkalso423
ParticipantTo prevent titles from displaying in breadcrumbs, follow these methods depending on your platform or CMS TO Read More
1. WordPress (Using Yoast SEO)
Go to SEO > Search Appearance > Breadcrumbs in your WordPress dashboard.
Scroll down to Breadcrumbs for Single Posts and disable the Show Post Title option.
If needed, modify the breadcrumb template via your theme’s functions.php file by customizing the Yoast filterFebruary 21, 2025 at 5:15 pm #509173lonzobrown
ParticipantWe are using the Yoast SEO for that you can check RapidHMS for that it work or not.
-
AuthorPosts
- You must be logged in to reply to this topic.