• I am using Woocommerce, and on the products/shop page (template woocommerce/content-product.php) for some reason, this code:

    <a href="<?php the_permalink(); ?>">
    	<h3><?php the_title(); ?></h3>
    	<?php echo the_content(); ?>
    </a>

    renders multiple/duplicate anchor links. I end up with an empty anchor at the beginning, empty meaning it has a permalink value in the href, but no clickable content between the open and close anchor <a href="https://mydomain.com/post-title"></a>, and then another anchor around my title, and then another anchor around my content!

    Why is it executing so many anchors? I just want a single anchor around everything, meaning one anchor around my title AND content. Interestingly, if I remove my single anchor, then there are no anchors at all.

    I wish I could provide a link; however, we are developing and testing behind a firewall.

    Thanks,
    Jennifer

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘woocommerce products page – too many anchors’ is closed to new replies.