Greetings,
Our design team has customized a cloud template for our individual post pages. They would like the ability to add custom sidebars to specific pages. However none of the things they’ve tried have worked. I came across this page which suggests using the widget sidebar module, or by including a sidebar into the cloud template itself.
What they’re really looking for is a way to add a custom shortcode to any given page, and have it show up in the sidebar. They don’t want to add it to the template because then it would show up on every page using that template. They don’t want to create additional templates because they’d essentially be duplicating a template and only changing the sidebar.
Is it possible for the Newspaper theme to read in the value of a custom field, and render it in the sidebar of a cloud template?
For example
* The user creates a shortcode [foobar id=1234" category="SEC"] and assigns it to the “sidebar_shortcode” custom field.
* The cloud template is able to read in the value of that field and render the shortcode
* If any given page doesn’t have a value for that field it does nothing.
Is that possible?
-
This topic was modified 5 years by
technologyadvicecom. Reason: adding tags
Hello,
On the Single Post Template on Cloud Library, the sidebar can be customized per post only if you make a new single post template (as you said, this is different from a sidebar made with widgets). Now I’m not 100% sure that using a shortcode will work, but normally with our theme you can use shortcodes but placing them using tagDiv Composer (you need to set the shortcode with the theme builder in column text or text with title in the place where you want to display).
You can try and let me know about your results.
Thank you!
Thank you Anamaria,
I’ve already been able to hardcode a shortcode in a tagDiv composer module and have it show up on the page. But by hardcoding this module, it will be the same for every page using that template.
Can you indicate whether it’s possible to load content from the postmeta table from within a tagDiv composer build template?
Regards
Andy
Hello,
A suggestion would be to modify a block that you have not used on the website and to use it only when you want to display that extra data, in this way the modification will not be applied to the rest of the blocks.
Or another alternative is to create your own block, for that please check this article https://forum.tagdiv.com/developer-info/
Thank you!