Skip to content

Translate Any Plugin/Theme Text via Your Child Theme

Translate Any Plugin/Theme Text via Your Child Theme

add_filter( 'gettext', function( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'String 1' : $translated_text = esc_html__( 'String 1', 'total' ); break; case 'String 2' : $translated_text = esc_html__( 'String 2', 'total' ); break; case 'String 3'…

Read more

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