Hi,
Thanks for your great plugin.
I’m struggling to override carousel-post-loop.php. The carousel widget does actually what I need besides that I want to add more information over the thumbnail when I’m hovering it. Easily done by duplicating the .template file but I can’t find a way to make it work in my custom theme.
I’ve been tested a couple of locations without success:
customtheme/templates/carousel-post-loop.php
customtheme/tpl/carousel-post-loop.php
customtheme/widgets/post-carousel/tpl/carousel-post-loop.php
Hope you can help me out.
Thanks a lot.
Hi Omp,
The SiteOrigin Post Carousel widget uses the SiteOrigin Widgets Bundle template system so adding the post loop template to your theme sadly isn’t enough to override it. You’ll need to override it with PHP. Here’s a brief example of how to do this.
To clarify, the template filter for the post carousel is: siteorigin_widgets_template_file_sow-post-carousel and I wouldn’t run the variable checks. All up, something like this should work:
Thanks Alex.
For those who’re still struggling to achieve this, here is how I make it works. The trick is not only duplicate the loop, but also the base so the variables can be fetched.
#1, duplicate the base.php and carousel-post-loop.php from the so-widget-bundle folder to /tpl/base-carousel.php and /tpl/carousel-post-loop.php (base.php is changed into base-carousel on purpose to avoid any conflict if you plan to override more than on template)
#2, add this to your functions.php
Now you can edit your very own templates.
Again, thanks Alex without whom I would still be searching a solution for this.
Hi Omp,
Thank you for sharing your solution! :)