Skip to content

Snippet: Conditionally Alter Topbar Content

add_filter( 'totaltheme/topbar/content', function( $content ) {
	if ( is_page( 'about' ) ) {
		$content = 'Custom Content'; // Return custom content for the about page
	}
	return $content;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top