Skip Navigation

[Resolved] Dynamic link to external site

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 1 reply, has 2 voices.

Last updated by Luo Yang 1 year, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2580827

Tell us what you are trying to do?
I am creating an index for a magazine. I want to be able to link to the shop page where you can purchase an issue. The shop is a separate website with a different URL than my site.

I have a CPT for individual articles. I have a taxonomy for Issue Number. The URL to the shop page is in a custom field on each Issue Number term.

I have created a template for single articles and a template for the single issue archives. I would like to be able to put a link or button in these templates, linking to the shop page for that issue.

I can find no way to do this dynamically. On Containers and Headings, the only options for dynamic links are the post title or the author title. You cannot select a post meta field containing a link.

Is there any documentation that you are following?
I have found no relevant documentation. I did find a prior support ticket with the same request: https://toolset.com/forums/topic/affiliate-external-product-link-as-dynamic-url/ But that thread does not contain any discussion of a solution to the problem.

#2581225

Hello,

In your case, it needs a taxonomy view, see below test site:
Login URL: hidden link

1) Enable Legacy editor:
Dashboard-> Toolset-> Settings-> General, in section "Editing experience", enable option: Show both the legacy and Blocks interface and let me choose which to use for each item I build
hidden link

2) Dashboard-> Toolset-> Views, create a Taxonomy view "Issue Number terms":
hidden link
- Query terms of "Issue Numbers" taxonomy
- Filter by:
Taxonomy is set by the page where this View is inserted
- In view's loop, display the term field "URL to shop page"

3) In the single "individual articles" post, display above taxonomy view shortcode:
[wpv-view name="issue-number-terms"]

See the result here:
hidden link