Skip to content

Define Google Font Weights To Be Enqueued

Define Google Font Weights To Be Enqueued

/** * Alter the font-weights to be loaded with your selected Google Fonts * as defined at Customizer > Typography * * @link http://totalwptheme.com/docs/snippets/google-font-weights/ * @see framework/fonts.php * @since 3.3.2 * * @return array */ function myprefix_wpex_google_font_enqueue_weights( $weights ) {…

Read more

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
Back To Top