Hi, my site has been using Toolset for about three years without issue. I have a few statements like this:
[wpv-conditional if="( '[wpv-archive-title]' eq 'Colorado' )"]
...something...
[/wpv-conditional]
This has worked for years, and the title would be "Colorado" on pages without any problems. Now this resolves to "<span>Colorado</span>" so the condition doesn't equal TRUE anymore. I'm just having to find these issues.
First, can I alter [wpv-archive-title] to just return the title without the tags like it used to? That would be the best fix. But I'm not sure if we can alter these codes.
If that won't work, is it possible to do a search to find all of the places I've used [wpv-archive-title] so I can change my conditional statements to look for it with the <span> tag? It's tough to go through everything line by line.
Last, are there other codes that are now including HTML instead of just the content?
Thanks for your help with this,
Monica
Hello Monica and thank you for contacting the Toolset support.
I do not think that Toolset is the one returning "<span>Colorado</span>", I suspect that another component of your website is hooking into it and adding it. To confirm that, check if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Fourteen. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at the time to track where the incompatibility is produced.
can I alter [wpv-archive-title] to just return the title without the tags like it used to?
No, there is no supported way to do it. I'll suggest using the wpv-taxonomy-slug shortcode instead:
[wpv-conditional if="( '[wpv-archive-slug]' eq 'colorado' )"]
...something...
[/wpv-conditional]
Note, that I have used "colorado" in small letters, as the slug is almost always in small letters.
If that won't work, is it possible to do a search to find all of the places I've used [wpv-archive-title] so I can change my conditional statements to look for it with the <span> tag?
I won't suggest this, instead, let's first find out what component is adding the <span> tag, by following my first suggestion.
Unfortunately, there is no way to search for this shortcode where it is used. Unless you are a developer and you will try to search in the database.
are there other codes that are now including HTML instead of just the content
I do not think so. Some shortcodes have an attribute that makes sure the return value has no HTML elementsoutput='raw'.
I hope this answers your questions. I remain at your disposal.
Hi Jamal, thanks for your response. On these WordPress Archive pages, [wpv-archive-title] has returned just a string for three years, like “Colorado” without the quotes. It has just started adding the <span> tags around it. It’s definitely possible that another plugin is doing it.
[wpv-taxonomy-slug] does not return anything.
I took the time to go through my archive pages to adjust where I’m using the wpv-archive-title shortcode. I’m looking for the <span> tags now, which isn’t great but it’s working. Thanks for your help!