I've searched many places and tried many ways for this but no success.
I have a shortcode in my WP Theme like;
[recent_posts layout="thumbnails-on-side" columns="4" number_posts="4" offset="" cat_slug="" exclude_cats="" thumbnail="yes" title="no" meta="no" excerpt="no" excerpt_length="35" strip_html="yes" animation_type="0" animation_direction="down" animation_speed="0.1" class="" id=""][/recent_posts]
(It is Avada theme's recent posts shortcode). In the core, this shortcode executes
WP_Query( $args )
function to get posts. But this shortcode cannot be used with Custom Post Types because coders didn't put 'post_type' attribute to shortcode $args (so because of default value is 'posts', shortcode only fetches standard posts).
As a result, i would like to extend/define new extended version of this shortcode for adding 'post_type' attribute as a variable (because i would like to use it for many custom post types). How can i do that? Thanks.
post_type
option or make possible to add custom arguments to the shortcode.