I've created a very simple content template using the block editor.
It displays a cover image using dynamic content (featured image), and the page title.
I want to display this template in a widget area on the page.
There doesn't seem to be any easy way to do this. There is no Toolset content template widget.
So I created a View that includes only my content template, that I could add using the WP Views widget.
The problem is in the View's filter, I can't filter by the current post in the loop, so ALL posts are returned in the query.
I can output the content template correctly in the page directly, but I need it in a widget area.
Why can't I create a View using blocks and dynamic content?
Hi,
Thank you for contacting us and I'd be happy to assist.
You don't need a view in this case, since it is possible to display a content template directly using the shortcode "wpv-post-body":
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body
Example:
[wpv-post-body view_template="Name of the content template"]
Note: You'll replace "Name of the content template" with your actual template's name.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Thank you, Waqar.. I will try adding the shortcode to my widget.
I have another problem.. when trying to solve my issue, I decided to recreate my content template.
But I can no longer choose Featured image as the dynamic source. It only shows Author picture URL in the drop-down.
See attached screenshot
Update:
After a couple of hours, it eventually let me choose the featured image from the dropdown (I have no idea why it started working - this seems like a bug), and the widget is working.
I will mark this as resolved, but I will reply to this again if I have further trouble.
My issue is resolved for now. Thank you!