Altering Header Style by Page

This is a Developer Level doc.

If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.

If you want to display a different Header Style on certain pages that is different than your default style, use the following PHP snippet:

* Alter your header style for your home page
* Replace is_front_page() with is_page( 'page name' ) where you want to alter the header style
* @return transparent, minimal, top, full_screen, center, medium, vertical, custom
function my_homepage_header_style( $style ) {

	// Return the transparent header style
	if ( is_front_page() ) {
		$style = 'transparent';

	// Return
	return $style;

add_filter( 'ocean_header_style', 'my_homepage_header_style' );

Adjust is_front_page() and $style values per your need.

All PHP snippets should be added via a child theme's functions.php file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.