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

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk