johnB-37
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Not able to access plug in page
Started by: johnB-37 in: Toolset Professional Support |
|
2 | 3 | 5 years, 8 months ago | |
Outputting an image based on text field
Started by: johnB-37
in: Toolset Professional Support
Problem: I have a custom text field that is used to store the name of a country. I would like to display the flag of that country on the front-end of the site, instead of the text name of the country. Solution: You can construct an image HTML tag using the Types field shortcode as a variable. For example, you can upload images like "Tanzania.jpg" and "Rwanda.jpg" to your server, then build the image tag like this: <img src="/wp-content/uploads/flags/[types field='country' output='raw'][/types].jpg" alt="[types field='country' output='raw'][/types]" /> It only works if the country names and image file names are identical. If possible, you should use a select field with predefined country names. Relevant Documentation: |
|
2 | 3 | 6 years, 2 months ago |