Skip to content

Add Custom Image Size for Page Header Backgrounds

Add Custom Image Size for Page Header Backgrounds

By default the page header title with background displays the full image selected so you can crop it prior to uploaded if wanted. However, if you want to add a new custom image size for this it is possible via…

Read more

Display Menu Search Dropdown on Hover

add_action( 'wp_footer', function() { ?> ( function( $ ) { 'use strict'; $( '.search-toggle-li' ).hover( function() { $( this ).toggleClass( 'active' ); $( '#searchform-dropdown' ).toggleClass( 'show' ); } ); } ) ( jQuery ); <?php } );

Read more

Conditionally Show/Hide Footer Widgets

add_action( 'totaltheme/footer/is_enabled', function( $bool ) { // Hide for all blog related queries and single posts if ( is_singular( 'post') || wpex_is_blog_query() ) { $bool = false; } // Return boolean return $bool; } );

Read more

Remove Woo Shop Page from Breadcrumbs

function myprefix_breadcrumbs_trail( $trail ) { // Remove cart from trail unset( $trail['shop'] ); // Return trail return $trail; } add_filter( 'wpex_breadcrumbs_trail', 'myprefix_breadcrumbs_trail', 20 );

Read more

Restrict WordPress Content To Logged In Users Only

// Example 1: Restrict access to whole site and redirect to the wordpress login page add_action( 'template_redirect', function() { // Front end only and prevent redirections on ajax functions if ( is_admin() || wp_doing_ajax() ) { return; } // Redirect…

Read more
Back To Top