D
D
DeniSidorenko2019-06-23 12:12:00
WooCommerce
DeniSidorenko, 2019-06-23 12:12:00

How to add attribute for one woocommerce_breadcrumbs item?

Question in the title) I have a function <?php woocommerce_breadcrumb(); ?>
How to add an attribute for one specific item (category)rel="nofollow"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Kobzarev, 2019-06-23
@DeniSidorenko

You need to use hook woocommerce_breadcrumb. Print what is passed to it and it will become clear how to change it:

add_action( 'woocommerce_breadcrumb', function( $breadcrumbs, $args ) {
    print_r( $breadcrumbs );
    print_r( $args );
}, 10, 2 );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question