Skip Navigation

[Fermé] Remove the comma after a list of items in a field

This support ticket is created Il y a 3 années et 11 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Marqué : 

This topic contains 8 réponses, has 2 voix.

Last updated by Shane Il y a 3 années et 11 mois.

Assisted by: Shane.

Auteur
Publications
#1603927

Tell us what you are trying to do?
I have a custom field that has data inputed as follows

More Features is the Custom Field, The content in the field looks like
Secure Parking, Outdoor Entertainment Area, Split System Air Conditioning, Built in Robes, Ducted Heating, Ceiling fans x2 in lounge, External awnings

I'm trying to output the fields without the commas and in an unordered list rather than how it is displaying now.

Is there a similar example that we can see?
hidden link

Thank you

#1604395

Shane
Supporter

Languages: Anglais (English )

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

Hi Jaffa,

Thank you for getting in touch.

Could you send me a screenshot of what you are using to display this information on the frontend ?

This should guide me on how best to advise on a solution.

Thanks,
Shane

#1604431

Hi Shane,

Just using a simple shortcode:

[wpv-conditional if="( $(wpcf-other-features) gt '' )"]
[types field='other-features' output='raw'][/types]
[/wpv-conditional]

#1604519

Shane
Supporter

Languages: Anglais (English )

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

Hi Jaffa,

Try adding the separator attribute.

[wpv-conditional if="( $(wpcf-other-features) gt '' )"]
[types field='other-features' output='raw' separator=' '][/types]
[/wpv-conditional]

As you can see i've added an empty string for the separator value.

Please let me know if this helps.
Thanks,
Shane

#1604525

That removed the commas but how do I arrange it in a unordered list.

Thanks

#1604617

Shane
Supporter

Languages: Anglais (English )

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

Hi Jaffa,

While you are not able to get a true list you can break each term into its own line.

For the separator you can use the break tag.


[wpv-conditional if="( $(wpcf-other-features) gt '' )"]
[types field='other-features' output='raw' separator='<br />'][/types]
[/wpv-conditional]

This should break each of your selection into a new line.

Thanks,
Shane

#1605053

Hi Shane,

That does not seem to work. If you look at the webpage it has not changed the output.
Sorry to be a pain

#1605753

Shane
Supporter

Languages: Anglais (English )

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

Hi Jaffa,

I managed to test this on my end and the items were displayed in a list.

When I checked your site and saw that the comma is still showing up.

Would you mind allowing me to have admin access to the site to check on this further for you.

Thanks,
Shane

#1605755

Shane
Supporter

Languages: Anglais (English )

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

private fields

Le sujet ‘[Fermé] Remove the comma after a list of items in a field’ est fermé à de nouvelles réponses.