Integrate Genesis Title Toggle with Custom Theme

If your theme moves the location of the page title, you’ll need to add some code to tell Genesis Title Toggle where it is and how to remove it.

Use the be_title_toggle_remove hook to run code when the title should be disabled. You can review these examples of customizations we’ve made for specific StudioPress themes.

If you added a page header like this, you could remove it when “Hide Title” is checked like so:

<?php
/**
* Integrate with Genesis Title Toggle
*
* @see https://www.billerickson.net/code/genesis-title-toggle-theme-integration
* @author Bill Erickson
*/
function be_integrate_genesis_title_toggle() {
remove_action( 'genesis_after_header', 'be_page_header' );
}
add_action( 'be_title_toggle_remove', 'be_integrate_genesis_title_toggle' );
view raw functions.php hosted with ❤ by GitHub

Genesis Title Toggle