next\previous product
-
Hello!
I try to add next\previous groupped product links on the product page.
I use this code and it works.add_action( ‘woocommerce_before_single_product’, ‘woocommerce_productnav’);
function woocommerce_productnav() {
?>
<div class=”post-nav fix”>
<span class=”previous”><?php previous_post_link($format=’« %link’, $excluded_categories = ‘alchemia,east,earth,teeth,kingdome,bowl,beavers’); ?></span>
<span class=”next”><?php next_post_link($format=’« %link’, $excluded_categories = ‘alchemia,east,earth,teeth,kingdome,bowl,beavers’); ?></span>
</div>
<?php
}But in the link text all excluded categories are displayed.
And then I add link text in the same code, for example:
<span class=”previous”><?php previous_post_link($format=’« %link’, ‘Previous’, $excluded_categories = ‘alchemia,east,earth,teeth,kingdome,bowl,beavers’); ?></span>
Then my link disappears.
How to set up the linked text?
- The topic ‘next\previous product’ is closed to new replies.