Skip Navigation

[Resolved] Strange Output when using costom fields in template

This thread is resolved. Here is a description of the problem and solution.

Problem:

Setup HTML link with Types custom shortcodes.

Solution:

You can use Types shortcode to setup the HTML link manually.

Relevant Documentation:

https://toolset.com/documentation/customizing-sites-using-php/functions/

This support ticket is created 2 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: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 3 voices.

Last updated by a.R 2 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2273289

a.R
<img src="[types field='med-beitrags-verzeichnis' output='raw'][/types][wpv-post-slug]_wannaknow_m.[types field='med-beitragsbild-format' output='raw'][/types]" style="height: auto;/*max-width:  9vw !important;*/ max-width: 100%; position: relative;" class="[types field='med-beitragsbild-format' output='raw'][/types][types field='med-beitragsbild-mit-schatten-anzeigen'][/types]">

is translated to

        
        <img src=" _medien="" _oekologie="" ueberblick-mensch-und-umwelt_wannaknow_m.jpg"="" style="height: auto;/*max-width:  9vw !important;*/ max-width: 100%; position: relative;" class="jpg">

instead of

        
        <img src="_medien/_oekologie/ueberblick-mensch-und-umwelt_wannaknow_m.jpg"="" style="height: auto;/*max-width:  9vw !important;*/ max-width: 100%; position: relative;" class="jpg">

'med-beitrags-verzeichnis' is a RADIO field with content "/_medien/_oekologie/"

What´s going on there? THANK YOU 🙂

#2274025

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Does the radio field content include the quotation marks?

If so, they are being output as part of the src attribute for your img tag and breaking the markup.

Try storing the radio field content without the quotation marks.

#2274303

a.R

No, the quotation marks are not stored in the radio field.
And this has worked perfectly until maybe 2 weeks ago.

#2274685
radio1.jpg
radio2.jpg

Hello,

I have tried the same shortcodes as you mentioned above in my localhost with a fresh WP installation + the latest version of Toolset plugins, it works fine, see my screenshots.

So the problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, deactivate all other plugins, and switch to WordPress default theme 2021, and test again
3) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem post URL and content template URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#2277483

a.R

My issue is resolved now. Thank you!

Problem was something like

<a href="..." title="> to the page">
                     ^

above in that template...