This is a follow up question for this topic: https://toolset.com/forums/topic/how-to-display-dynamic-content-on-pages-based-on-a-selection-on-the-landing-page/
In that topic, we added a post ID as a dynamic parameter to the URL. Now, I would like to add that parameter on a button.
So for example, the URL of a page is xxx.com/?contact_id=1462. Now, I have a contact button on that page, that should point to xxx.com/contact/?contact_id=1462.
So I need to capture the parameter and add that to the button's URL.
If you are able to edit the button markup directly (rather than inserting a button via a block or page builder, for example) then you can output the value from a url parameter using the wpv-search-term shortcode, specifying what the parameter is, e.g.
[wpv-search-term param='contact_id']
You could use that when constructing the href attribute of the button.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-search-term
What a clever solution, that works fine 🙂 Thanks!