I would like to add a link to see all related products. What I have is something like this:
<a href="https://mysite.com/?s=<?php 'product_tag' ; ?>">See all colorways of this pattern</a>
But I’m having a hard time passing the correct variable to the search link. I cant figure out which variable is containing the product tag.
This would be very helpful because some of my products have more than 100 related products and I don’t want to have to list all of them on the single product page. It would be more efficient if I could just show 20 and have the link to the search page for the rest.
This is where I’m trying to add the code:
<?php endwhile; echo "</div><div class='clear'></div>"; ?><a href="https://mysite.com/?s=<?php echo 'product_tag' ; ?>">See all colorways of this pattern</a><?php endif; ?><?php wp_reset_postdata(); } } /** * This is style for related product, default.
Maybe this could be added as a function in the next release?
Any help would be appreciated.
- The topic ‘Adding a "see all" link’ is closed to new replies.