However his link was being rendered multiple times even though it should only be there once. Solution:
This was actually caused by the [wpv-post-taxonomy type="age-category" separator=" "] Shortcodes as it is rendering the taxonomy terms as links which breaks the wrapping a tag.
To resolve this just change the format of the taxonomy output from a link to just the name.
[wpv-post-taxonomy type="age-category" separator=" " format='name']
This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
You can see the 3 blocks to the right of "Helping you teach the tough stuff". These are created with a content template that is part of a view. The code for the content template is:
But if you look at the code on the frontend you can see the link tags that contain the rest of the code are being created 5 times instead of once. Can you tell me why this is please?
So the issue is pretty much with this shortcode [wpv-post-taxonomy type="age-category" separator=" " ]
The post taxonomy shortcode is generating an anchor tag for each taxonomy term. This is why you are experiencing this issue because of an A tag within an A tag.
What i've done currently is to set it to display only the taxonomy name without the link using the format='name' attribute.
Thanks for identifying the issue and fixing the link problem. However, I need to be able to style the individual terms to have black backgrounds etc. I cant see a way to do this with 'name' as there are no tags for me to use (I actually didnt need the a tags around them originally but used them as a way to target them for styling). Is there a solution here?
That doesnt work. The first term is ignored as it comes after the first seperator and the third term doesnt have its p tag closed until after another unrelated element.
But search-resource-single-age is not relevant as its just a containing class (Ive actually removed it as its not doing anything. ) The current code is :
Thanks Shane. It would be great to have the option to wrap each term in a chosen tag. I used a custom taxonomy view to solve the issue, but its annoying to have to replicate the functionality of a shortcode with a whole view.