Skip to content

Use Yoast SEO Primary Category for Related WooCommerce Products

Apply Masonry Layout to WooCommerce Shop

Masonry layout isn't supported by default on the WooCommerce shop because it could cause issues with 3rd party scripts but it's possible to enable this layout with a little code in your child theme's functions.php file. Updated for Total v5.3+

Read more

Add Content Above Mobile Toggle Menu

add_action( 'wp_footer', function() { ?> ( function( $ ) { 'use strict'; $( window ).on( 'load', function() { var $nav = $( '.mobile-toggle-nav' ); if ( $nav.length ) { $nav.prepend( 'Your custom html code here.' ); } } ); }…

Read more

Display WooCommerce Category Image Above Products

add_action( 'wpex_hook_header_after', function() { if ( ! is_singular( 'product' ) || ! function_exists( 'wpex_get_first_term_id' ) || ! function_exists( 'wpex_get_term_thumbnail_id' ) ) { return; } // Get first category $term = wpex_get_first_term_id( get_the_ID(), 'product_cat' ); // No terms, lets not do…

Read more

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
Back To Top