Skip Navigation

[Resolved] wpv-archive-title now includes html tags — can they be removed?

This support ticket is created 4 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by monicaI 4 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#1739989

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

#1740261

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.

#1740511

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!