Last active
August 29, 2015 14:08
-
-
Save renventura/c0728d062f1c4c6a7f60 to your computer and use it in GitHub Desktop.
How to Display a Custom Page Title in Genesis (Part 1/3)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* Mind this opening PHP tag | |
//* Reposition Page Title | |
add_action( 'genesis_before', 'centric_post_title' ); | |
function centric_post_title() { | |
if ( is_page() and !is_page_template() ) { | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_after_header', 'centric_open_post_title', 1 ); | |
add_action( 'genesis_after_header', 'genesis_do_post_title', 2 ); | |
add_action( 'genesis_after_header', 'centric_close_post_title', 3 ); | |
} elseif ( is_category() ) { | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
add_action( 'genesis_after_header', 'centric_open_post_title', 1 ) ; | |
add_action( 'genesis_after_header', 'genesis_do_taxonomy_title_description', 2 ); | |
add_action( 'genesis_after_header', 'centric_close_post_title', 3 ); | |
} elseif ( is_search() ) { | |
remove_action( 'genesis_before_loop', 'genesis_do_search_title' ); | |
add_action( 'genesis_after_header', 'centric_open_post_title', 1 ) ; | |
add_action( 'genesis_after_header', 'genesis_do_search_title', 2 ); | |
add_action( 'genesis_after_header', 'centric_close_post_title', 3 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment