Enable WooCommerceProduct Gallery Arrows
add_filter( 'woocommerce_single_product_carousel_options', function( $options ) { $options['directionNav'] = true; return $options; } );
add_filter( 'woocommerce_single_product_carousel_options', function( $options ) { $options['directionNav'] = true; return $options; } );
Because of how WordPress menus work the only way to add a login/logout is either using a plugin or custom code that hooks into the menu output. Here is a snippet showing how you can add your own custom login/logout…
If you are working on a site where you are using the overlay header for a specific design on multiple pages rather than using the Visual Composer to add the content under it (if it can be gathered dynamically) you…
The following snippet shows you how you can insert a WPBakery template to your site via a hook, this is ideal for advanced usage where you may need to add custom conditionals so it doesn't show up on every page,…
// Add breadcrumbs under the site header if page header is disabled add_action( 'wpex_hook_header_after', function() { if ( ! wpex_has_page_header() ) { wpex_get_template_part( 'breadcrumbs' ); } } ); // Set the breadcrumbs position to custom when page header is disabled…
// Remove from everywhere add_filter( 'wpex_metaboxes', '__return_false' ); // Remove from specific post types add_filter( 'wpex_metaboxes', function( $bool ) { if ( 'portfolio' != get_post_type( $_GET['post'] ) ) { $bool = false; // disable on all types besides portfolio }…
// Enable overlay header site-wide add_filter( 'totaltheme/header/overlay/is_enabled', '__return_true' ); // Overlay header style add_filter( 'totaltheme/header/overlay/style', function( $style ) { $meta = get_post_meta( get_the_ID(), 'wpex_overlay_header_style', true ); return $meta ? $meta : 'dark'; } ); // Change the page header style…
add_filter( 'totaltheme/page/header/subheading', function( $string ) { if ( is_singular( 'post' ) ) { return get_the_date(); } return $string; } );