• Resolved ximrx

    (@ximrx)


    If WordPress website is installed like blog.domain.com or domain.com/blog. Breadcrumbs generated are like Blog > Post. How can we add a prefix item to these items like Website > Blog > Post. We can use “Prefix for the breadcrumb path” option to add html prefix for apparent result but this does not add item in schema data.

    It is common to install WordPress website as non root subsection of domain.

    • This topic was modified 3 years, 8 months ago by ximrx.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello,

    Thanks for reaching out.

    Yoast SEO plugin does not have a feature to change the breadcrumb pathway in the way you have described. You will need to use a filter wpseo_breadcrumb_links to change the single items in the pathway as described here https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/#pathway.

    Thread Starter ximrx

    (@ximrx)

    add_filter( 'wpseo_breadcrumb_links', 'yoast_seo_breadcrumb_prepend_link' );
    function yoast_seo_breadcrumb_prepend_link( $links ) {
        global $post;
            $breadcrumb[] = array(
                'url' => 'https://domain.com',
                'text' => 'Domain',
            );
    	    $links = array_merge($breadcrumb , $links);
        return $links;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Breadcrumb prefix for subdomain or subdirectory wordpress installations’ is closed to new replies.