Enable Breadcrumbs on a Single Product Page

This is a Developer Level doc.

If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.

If you have disabled Page Title on a WooCommerce single product page but still want to display breadcrumbs, use the following PHP snippet:

// Display Breadcrumbs On Single Product Page
function prefix_oceanwp_breadcrumb() {
    if ( is_product() ) {
        echo do_shortcode( '[oceanwp_breadcrumb]' );
    }
}
add_action( 'woocommerce_before_single_product_summary', 'prefix_oceanwp_breadcrumb', 5 );

All PHP snippets should be added via a child theme's functions.php file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.