Skip Navigation

[Resolved] [wpv-post-taxonomy type="locatie" format="name"] Not working as URL parameter

This support ticket is created 3 years, 12 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by johanB-4 3 years, 12 months ago.

Assisted by: Shane.

Author
Posts
#2282841

We have several buildings with flats that are available for rent. This is assisted living for elderly.
I use a taxonomy for the buildings since this taxonomy is also used on other parts of the site.

In my content template for 'flat' i placed a button "More info or rent?"
I'm trying to construct a dynamic URL:
hidden link type="location" format="name"]&flat=[types field='flat-number'][/types]

The flatnumber is shown in the URL, but no matter what i try, the taxonomy does not show and stays empty.
I can place [wpv-post-taxonomy type="location" format="name"] whereever i want in the content template, it works. Just not when building the URL for a button.

I use the URL parameters in the form on the /request-info page so we know what building and flat people are inquiring about.
Any suggestions?
Many thanks!

Johan.

#2282891

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johan,

Thank you for getting in touch.

The problem is that you're using double quotes inside the shortcode which most likely results in the URL tag being closed early. Try using single quotes like this [wpv-post-taxonomy type='location' format='name']

Please let me know if this resolves the issue for you.

Thanks,
Shane

#2283053

I overlooked the obvious. Double quotes instead of single qoutes 🤦‍♂️
However, i did generate the shortcodes via the "Toolset Shortcode" link in the upper admin bar. I just tested: when generating a shortcode for a custom field, the shortcode is incapsulated with single qoutes. When i do the same for taxonomies, there are double quotes. I just copy/paste without looking. Maybe this is a bug?

anyway, Shane, big shoutout and thanks!!