Skip Navigation

[Resolved] Simple @ sign output

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

Problem:

Display multiple instances textarea field "location", format with HTML P tag + @.

Solution:

Since the field "location" is a custom textarea field, it will output extra HTML P tags by default, you can disable it by setup the output="raw" attribute, for example:

https://toolset.com/forums/topic/simple-sign-output/#post-1098401

Relevant Documentation:

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

This support ticket is created 5 years, 7 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 6 replies, has 2 voices.

Last updated by Luo Yang 5 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1094666

Jas
screenshot view for health search.png

Hi,

Following the advise I got last time, I was able to fix all the issues that arose from problems using Divi together with Toolset; which resulted in messed up html/shortcodes (which took me forever to produce in the first place). Now it seems like I can fix when needed.
However the last content template to mess up, I don't think happend before, so I didn't have the shortcodes/html documented to fix.
I've added the @ sign as it shows up in the view as per attached screenshot, however, I need the @ sign to appear next to each location on the same line (while keeping space between each location). I know this will have a exceedingly simple answer, but I don't know it:p

Also I had the link title text showing up in my link color that I had selected, and now it's not. how do I get that back?

thanks so much!

see on hidden link

#1094677

Hello,

Please backup your website, and provide website credentials in below private message box, I need to test and debug it in a live website. thanks

#1094752

Thanks for the details,

Q1) I need the @ sign to appear next to each location on the same line

since the field "location" is a custom textarea field, it will output extra HTML P tags by default, you can disable it by setup the output="raw" attribute, for example, edit the content template:
hidden link

Edit the codes to:

[wpv-for-each field="wpcf-location"]@[types field='location' separator='' output="raw"][/types][/wpv-for-each]<br/>

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#textarea
output:
'raw' | 'normal'(default)
‘raw’=Display raw data stored in DB. No other formatting attributes (e.g. custom separator) will be respected.

‘html’=Wrap data in HTML.

Q2) Also I had the link title text showing up in my link color that I had selected, and now it's not. how do I get that back?

It needs a little CSS codes, for example:
1) edit the content template:
hidden link

Add a custom CSS class name to the post title:
<h3 class="my-title">[wpv-post-link]</h3>

2) Edit view, in section "Loop Editor", click "CSS Editor", add below CSS codes:

.my-title a{
color:#00d6d2;
}

And test again.

#1097368

Jas
at sign spacing and separate line.png

Yes, that gets the @ sign on the same line as the location. But for some reason when I add paragraph tags/line breaks to the shortcode it doesn't work (it actually worked once, and then 15 minutes later was reverted back!). Can you please try to add these tags as I still need:

1) Space between @ sign and location
2) each location on their own line.
3) Space between final location and star ratings.

Please see screenshot.

#1098401

I have modified the codes in your website as below:

...
[wpv-for-each field="wpcf-location"]<p>@ [types field='location' separator='' output="raw"][/types]
[/wpv-for-each]<br>
...

Please test again, check if it is what you want

#1100256

Jas

Thanks again Luo Yang! Appreciate it!

#1100877

You are welcome

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.