• Resolved jwvantilburg

    (@jwvantilburg)


    Already tried this with the woocommerce plugin support but that didn’t bring me a lot closer.

    What we would like to have is that we can custom change the breadcrumbs.

    And not sure how to fix it, That’s how we landed here. We’ve made custom pages; where we load & display products. The custom pages are in general ‘countries’ so like this:

    https://ferrygogo.com/united-kingdom/

    The products are the ferry lines to the UK (for example: https://ferrygogo.com/route/hull-rotterdam/), but the product categories can be similar to the custom page. We would like to have the breadcrumbs link back to the custom page, and make the product category a 301. Is there any way to fix this properly. Kind of a head breaker for me personally.

    When I try to append the breadcrumb link it only works for one specific product even when adding more id’s. Here it works ‘sort of’ now for example:
    https://ferrygogo.com/route/copenhagen-oslo/

    I would like the breadcrumb on single product page to be: Home » Ferry to Norway » Copenhagen-Oslo

    add_filter( ‘wpseo_breadcrumb_links’, ‘yoast_seo_breadcrumb_append_link’ );

    function yoast_seo_breadcrumb_append_link( $links ) {
    global $post;

    if ( is_single( 11081, 11082, 11096, ) ) {
    $breadcrumb[] = array(
    ‘url’ => site_url( ‘/ferry-to-norway-from-the-uk/’ ),
    ‘text’ => ‘Ferry to Norway’,
    );

    array_splice( $links, 1, -2, $breadcrumb );
    }

    return $links;
    }

    Question is how do I make this work for more pages, what did I do wrong with the page id’s? And how can I get the product category out of the breadcrumb and have the custom page replace that one.

    Really hope you can help out.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello Jwvantilburg,

    Thanks for reaching out regarding your breadcrumbs.

    Unfortunately, I am unable to review your custom code. We have a comprehensive help article on how to implement Yoast SEO breadcrumbs at https://yoast.com/help/implement-wordpress-seo-breadcrumbs/. If you need further assistance outside of our documentation, someone from the community might help you when visiting this thread. So, we’ll leave the thread open for a week.

    devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Changing breadcrumb structure’ is closed to new replies.