That’s easy to do since the plugin is built out of templates that can be extended in your child theme by copying files from the plugin.
Pls copy the file
addons-for-elementor/templates/addons/posts-carousel/loop.php
file to your
mytheme/addons-for-elementor/addons/posts-carousel/loop.php
and then modify line number 16 with reference to WP_Query to suit your needs.
You can also take a look at the Posts Multislider widget which has more features than the posts carousel. Modifying WP_Query is similar to the one described above for the Posts Carousel.
Thanks for the help. I’d like to keep using the Posts Carousel because I am using custom Elementor templates with it. But can you give me a quick and dirty example of modifying line 16?
Thanks.
Some examples of how this works –
If you want to modify the query args –
$query_args['ignore_sticky_posts'] = 0; // do not ignore sticky posts
$query_args['orderby'] = 'rand'; // sort random
if (is_front_page()) {
$query_args['post__not_in'] = array(35139, 35069, 35037); //exclude these posts
}
or if you want to replace completely the query args with your own –
global $post;
$query_args = array(
'post_type' => 'page',
'posts_per_page' => -1,
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'menu_order'
);
You can modify the query arguments as per your requirement. Pretty flexible that way.
You can find several examples of meta key value queries similar to the ones posts above here –
https://rudrastyh.com/wordpress/meta_query.html
Thanks, that really helps. I just wanted to make sure I wasn’t messing anything up, lol.