Hi there,
Do you know, by chance, if there is a short code that can reproduce this?
See pic attached.
We wish to create an Kadence element, this for all our holiday home custom post types, this one template for all.
The image shows this set up correctly on the template we have created, however we can see no way of doing this is we design something away from the template.
In short, a Kadence 'element' is created away fro the template and then assigned to show on all.
Worth an ask 🙂
Hi Pete,
Thank you for contacting us and I'd be happy to assist.
Your observation is correct and the dynamic source dropdown option is available, only when working within the Gutenberg editor's environment.
For any other environment or editor, you can use the Types Fields API and Toolset Views shortcodes, to get the required data:
https://toolset.com/documentation/customizing-sites-using-php/functions/
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi there Waqar,
Thank you, I did find this page yesterday however having never really used shortcodes before don't even know where to start.
This page is full of, what looks like, every conceivable code for every scenario.
Where on earth do I start?
Thanks for writing back.
Simply put, the shortcodes are placeholder text/strings, which expand into more meaningful data.
You'll note that in the left sidebar of the 'Views Shortcodes' page, the list of shortcodes is grouped by their usage.
For example, under the 'Displaying data' heading, you'll find shortcodes that can be used to show data from the current single post/page, either on the single post/page or in the loop of the view.
If you'd like to display the current post/page ID, you can use '[wpv-post-id]' shortcode. And for the title, you'll use '[wpv-post-title]' and so on.
Similarly, you can search for the relevant shortcode and its attributes, based on what data or information you need.
If you face any difficulty in finding the right shortcode for a specific requirement or scenario, you're welcome to write to us anytime.
I kind of get 'some' of what you are saying.
Ok trying to use this, I see no shortcode for a dynamic link, this from a custom field called 'off site link'.
Is this possible? Does this kind of code even exist?
It is important to remember, that when using the shortcodes, they'll not generate the complete HTML code for you, like the blocks.
They'll only provide you the relevant dynamic piece of information, which you can use in your static HTML code, manually.
Here is a quick example. Suppose, I have a URL type custom field with slug 'off-site-link' and I want to show a link using that field's URL, that opens in a new browser tab. And for the link's title, I'd like to use the current post's title.
The HTML code for this link, with dynamic data from shortcodes, would be:
<a href="[wpv-post-field name='wpcf-off-site-link']" target="_blank">[wpv-post-title]</a>
Please note how I've used 'wpv-post-field' shortcode, to get the URL from the custom field and the 'wpv-post-title' shortcode, to get the post's title.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-field
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-title