Correct Way Of Adding Extra Content To Header
// Add custom content to header function my_custom_header_content() { ?> Some Text, could be anything though <?php } add_action( 'wpex_hook_header_inner', 'my_custom_header_content', 999 );
// Add custom content to header function my_custom_header_content() { ?> Some Text, could be anything though <?php } add_action( 'wpex_hook_header_inner', 'my_custom_header_content', 999 );
// Removecategories from breadcrumbs trail function myprefix_remove_cats_from_breadcrumbs( $trail ) { unset( $trail['categories'] ); return $trail; } add_filter( 'wpex_breadcrumbs_trail', 'myprefix_remove_cats_from_breadcrumbs', 20 );
The following snippet can be used to conditionally show/hide the Footer Callout section with code. So in this example we are hiding the Footer Callout for the front page only.
// There isn't a function built-in for this for many reasons, but it can be done with javascript like the example below: function wpex_add_target_blank_to_portfolio_entries() { ?> ( function( $ ) { 'use strict'; $(document).ready(function() { $('.portfolio-entry a').attr( 'target', '_blank' );…
// Disable The "Page Header" For Portfolio Items add_filter( 'totaltheme/page/header/is_enabled', function( $return ) { if ( is_singular( 'portfolio' ) ) { return false; } return $return; }, 20 );
// Add "nocookie" To WordPress oEmbeded Youtube Videos function wpex_youtube_nocookie_oembed( $return ) { $return = str_replace( 'youtube', 'youtube-nocookie', $return ); return $return; } add_filter( 'oembed_dataparse', 'wpex_youtube_nocookie_oembed' );
/* Display Header Aside On Mobile Devices */ @media only screen and (max-width: 959px) { body #header-aside { display: block !important; float: none; text-align: left; margin-top: 20px; } body #header-two-search { float: none; } }
// Add Google Tag Manager Code after opening body tag add_action( 'wp_body_open', function() { ?> YOUR CODE HERE <?php } );
function my_portfolio_category_description_above_loop( $bool ) { if ( is_tax( 'portfolio_category' ) ) { return true; } return $bool; } add_filter( 'wpex_has_term_description_above_loop', 'my_portfolio_category_description_above_loop' );