Problem: If a URL is submit by a user (via CRED form) as a custom taxonomy (slug 'link-to-buy') within a custom post type (slug 'jean-purchase-info') can I show that URL as a clickable link (where the href target is the 'link-to-buy') with generic text displayed like "buy here" rather than showing the URL?
Solution:
Yes and no. This is a tricky one because you have implemented a URL as a taxonomy term instead of a URL custom field. To display taxonomy terms associated with a post, you will use the [wpv-post-taxonomy] shortcode.
The problem is that this shortcode lists all terms from this taxonomy assigned to the post. So if more than one term is applied, this approach won't work because it will not allow you to create multiple links from multiple terms. Also if any terms in this taxonomy you have applied to these posts are not URLs, this approach will not work either because they will be displayed as broken links here.
So if you only have one term from this taxonomy applied to any post, and all the applied terms in this taxonomy are URLs, then you can do something like this:
<a href="[wpv-post-taxonomy type='custom-tax-slug' format='name']">Buy here</a>
Otherwise, you'll need to consider a different method of saving these URLs, perhaps in a repeating URL custom field.
Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-taxonomy
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 4 replies, has 2 voices.
Last updated by 7 years ago.
Assisted by: Christian Cox.