extend the feature of Breadcrumb widget from jetpack

47 Views Asked by At

Hi guys I need to show count of products depending on product category, sub category. I tried adding some hardcoded path but it does not seem to render it. I am not sure if using the correct method of breadcrumbs from Jetpack widget, Your help would be apprecited.

// Add a custom filter to modify the breadcrumbs output
function custom_breadcrumbs_filter($breadcrumbs) {
    // You can modify the $breadcrumbs array here
    // For example, add a custom link at the end of the breadcrumbs
    $custom_item = array(
        'text' => 'Custom Link',
        'url' => 'https://example.com/custom-link',
    );
    $breadcrumbs[] = $custom_item;

    return $breadcrumbs;
}
add_filter('jetblocks_breadcrumbs_output', 'custom_breadcrumbs_filter');

0

There are 0 best solutions below