we caboodle News

PHP Code for Yoast Breadcrumbs

News Categories: TechWordpress

This article was published on: 11/7/22 8:34 PM

We get asked by clients as a feature to ensure that breadcrumbs are part of the UX/UI on the new website build and the one thing which isn’t common knowledge is how to add it to the wordpress theme’s php. As Yoast is the number one plugin for Search Engine Optimisation on WordPress, we do not build a website without it installed.

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

The above code can be copied and inserted into your theme’s header files (if that’s where you would like to display it)

Tweak Yoast Breadcrumbs

Don’t forget to customise the styling of the Yoast Breadcrumb under the plugin’s settings section: Yoast > Search Appearance > Breadcrumbs

If coding isn’t for you, adding a shortcode will work the same but depending on the theme structure you may need to add it to all the pages one by one.

Home / News / PHP Code for Yoast Breadcrumbs


we caboodle - full service agency team

Ready to Start?

we are driven by the challenge of building a bespoke website for your business, improve SEO performance, fix UX/UI issues and streamline your branding across all social & paid channels.

Are you looking for a new, full service agency? contact us today for a free quotation or advice, and lets build something great, together!





    William Holt

    Meet Will

    I've been designing & developing websites for over 2 decades. my first project was built on Microsoft Frontpage, yes I go that far back!

    Speak to me direct regarding your next project or the benefits of switching your digital agency to Web Caboodle

    will@wecaboodle.com | 07368 229004 | LinkedIn Profile

    Web Design Manchester

    Studio 13
    Woolden Road

    Web Design London

    71-75 Shelton Street
    Covent Garden

    let's connect


    Copyright 2023 Web Caboodle - Web Design and Development Agency | We Website Design Ltd 13127888 Registered in England and Wales | Privacy Policy