Problem:
I aim to pass a value from a custom field "product id" on a custom post type template "brands" to another view displaying fields from a different custom post type "products." However, I am uncertain about creating a custom shortcode to achieve this.
Solution:
You're on the right track. Utilize code similar to the example provided in the Toolset forum (https://toolset.com/forums/topic/how-to-pass-a-variable-to-a-view/#post-380479) as a starting point. Additionally, refer to Toolset documentation for adding custom code (https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code) and passing arguments to views via shortcodes (https://toolset.com/documentation/legacy-features/views-plugin/passing-arguments-to-views/).
Relevant Documentation:
Toolset forum example: https://toolset.com/forums/topic/how-to-pass-a-variable-to-a-view/#post-380479
Toolset documentation:
Adding custom code: https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code
Passing arguments to views: https://toolset.com/documentation/legacy-features/views-plugin/passing-arguments-to-views/
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.
This topic contains 3 replies, has 2 voices.
Last updated by 9 months, 2 weeks ago.
Assisted by: Christopher Amirian.