Skip to content

Remove Content Blocks from Learn Dash Courses

Enable WooCommerce Gallery Auto Play

add_filter( 'woocommerce_single_product_carousel_options', function( $options ) { $options['slideshow'] = true; // enable auto slideshow $options['slideshowSpeed'] = 2000; // time in millesecond between slides return $options; }, PHP_INT_MAX );

Read more

Add Extra Content to Grid Elements

Every Total grid module for the page builder includes filters for each "section" so you can customize the output. For example if you insert the Post Type Grid there is a filter applied to the featured image, title, excerpt, button...etc…

Read more

Change Price for WooCommerce Out of Stock Products

function myprefix_edit_woo_price( $price, $product ) { if ( ! $product->is_in_stock() ) { $price = 'Sold'; } return $price; } add_filter( 'woocommerce_variable_sale_price_html', 'myprefix_edit_woo_price', 10, 2); add_filter( 'woocommerce_variable_price_html', 'myprefix_edit_woo_price', 10, 2); add_filter( 'woocommerce_get_price_html', 'myprefix_edit_woo_price', 10, 2);

Read more

Random Background Image on Refresh

add_action( 'wp_head', function() { ?> ( function( $ ) { $( document ).ready(function() { var images = ['image_url_1', 'image_url_2', 'image_url_3']; $( 'body' ).css( { 'background-image': 'url(' + images[Math.floor(Math.random() * images.length)] + ')' } ); } ); } ) ( jQuery…

Read more

Exclude Terms from Categories Meta

add_filter( 'wp_get_object_terms', function( $terms ) { if ( $terms ) { $excluded_terms = array( 100, 40 ); // array of term ID's to exclude foreach( $terms as $key => $term ) { if ( in_array( $term->term_id, $excluded_terms ) ) {…

Read more
Back To Top