Alter Author Bio URL
/** * Example showing how to change author bio URL by filtering the author data. */ add_filter( 'wpex_post_author_bio_data', function( $data ) { // Get global post global $post; // Add custom URL for post author with ID of 1 if…
/** * Example showing how to change author bio URL by filtering the author data. */ add_filter( 'wpex_post_author_bio_data', function( $data ) { // Get global post global $post; // Add custom URL for post author with ID of 1 if…
This little snippet will remove the variation and add to cart button from the single product summary and place it in the sidebar instead. You must have a sidebar enabled for the products (select your WooCommerce product layout in the…
This will add an extra logo to your header which will show up at the mobile menu breakpoint while hiding the default logo. This way you can have a different logo for desktop as you do at the mobile menu…
add_filter( 'totaltheme/sidebars/primary/name', function( $sidebar ) { // Alter sidebar for single gallery posts if ( is_singular( 'gallery' ) ) { $sidebar = 'my_custom_sidebar_id'; } // Return sidebar return $sidebar; } );
// IMPORTANT: There are now options at Customizer > Events Calendar for this!!! /** * Example for altering event calendar layouts. * I didn't find much documentation for the Events Calendar if you find better * conditionals to use, please…
/** * Enable Default WPBakery Templates * * @link https://totalwptheme.com/docs/snippets/enable-default-vc-templates/ */ No snippet available anymore!
/** * Example function for adding new Google Fonts to the TinyMCE */ add_filter( 'wpex_mce_fonts', function( $fonts ) { $fonts[] = 'Roboto Sans'; // Add Roboto Sans return $fonts; } );
/** * Example function to change the mobile menu style * Available styles: full_screen, sidr, toggle, disabled */ add_filter( 'totaltheme/mobile/menu/style', function( $style ) { // Set the mobile menu style to "full_screen" on the homepage only. if ( is_front_page() )…
/* Sample function showing how to edit the search results featured image * * IMPORTANT: If your theme is up to date you can modify the search results image size via * the settings at Theme Panel > Image Sizes…
add_action( 'totaltheme/topbar/is_enabled', function( $bool ) { // Disable on checkout if ( function_exists( 'is_checkout' ) && is_checkout() ) { $bool = false; } // Return display return $bool; } );