Skip Navigation

[Resolved] Render icons/pictures

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 10 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 5 replies, has 2 voices.

Last updated by Adriano 10 years ago.

Assisted by: Adriano.

Author
Posts
#205136

Is there a way to render icons based on what user has entered in custom fields? For example, if there is a

custom field [select type ]  

named Property Rating with values 1 to 5, if the user selects 5, then a 5-star icon would be rendered instead of number 5.
Your help will be highly appreciated. Thanks!

#205248

Dear pano,

That's possible, you should use wpv-if shortcode. I create an example for you below:

[wpv-if star="wpcf-star" evaluate="$star = 1"]
<img src="star1.png" />
[/wpv-if]

[wpv-if star="wpcf-star" evaluate="$star = 2"]
<img src="star2.png" />
[/wpv-if]

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

#205349

Adriano thank you so much for your reply. I need to buy views to check your proposed solution!! I'll do that and get back to you tomorrow.
Panos

#205355

Dear panos,

Great, I will keep this ticket opened waiting for your confirmation so.

#206520

It works like a charm. Many thanks !

#206591

You are welcome.

The forum ‘Types Community Support’ is closed to new topics and replies.

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