Skip to content

Exclude the Current Post from Elements

Exclude the Current Post from Elements

// Exclude Current Post from Any Total Grid/Carousel Module add_filter( 'vcex_query_args', function( $args, $atts ) { if ( wp_doing_ajax() ) { $current_id = url_to_postid( wp_get_referer() ); } else { $current_id = get_the_ID(); } $args['post__not_in'] = array( $current_id ); return $args;…

Read more

Scroll To Items on Filter

This snippet will make it so when a filter item is clicked it scrolls down to the items. This can be useful on mobile if you have a ton of filter links. As you can see by default it is…

Read more

How to Override Default Post “Block” Section

// Example for overriding a default Blog Post "block" or section // You can add print_r( $blocks ) inside your function and refresh your page to view a list of all available blocks on your site add_filter( 'totaltheme/blog/single_blocks', function( $blocks…

Read more

How to use post image attachments for gallery slider

add_filter( 'wpex_get_post_gallery_ids', function( $ids ) { $images = get_attached_media( 'image' ); if ( $images ) { $ids = array(); // reset incase there are any defined gallery images lets not include them foreach ( $images as $image ) { $ids[]…

Read more
Back To Top