Skip to content

Add or Remove Classes From The Header

Add or Remove Classes From The Header

/** * Add/Remove classes from the main header wrap * * @link http://totalwptheme.com/docs/snippets/header-classes/ * */ function myprefix_header_classes( $classes ) { // Add visibility class $classes[] = 'visible-desktop'; // Return classes return $classes; } add_filter( 'wpex_header_classes', 'myprefix_header_classes' );

Read more

Custom Google Font Lists

Using a filter you can define which Google Fonts are available when selecting fonts in the Customizer or in theme elements/shortcodes. So instead of loading hundreds of options you can load only the ones you will be using on the…

Read more

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…

Read more

Alter The Main Sidebar Display

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; } );

Read more
Back To Top