• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Move Page Title Not Post Title In Genesis

There’s 2 ways to reposition the entry title or page title as some call it in Genesis child themes without also moving the single post titles and the post titles on archive page types like the blog page.

  1. You can add the hooks to remove the title and entry header markup before and after the title, to a page template in your child theme root directory.
  2. Or you can add the hooks to a custom function with conditional tag in your child themes functions file. This will remove and add back the title in any genesis hook position

1. Page Template

Create a file named page.php in your child themes root directory and add the following code:

The above code will reposition the entry title on all single and archive page types.

2. Custom Function

Added to your child themes functions file, the following PHP code will reposition the page title on single pages only and NOT on archive pages.

add_action( 'genesis_meta', 'reposition_entry_header_elements' );
function reposition_entry_header_elements() {
    
if ( is_singular( 'page' ) && ! is_page_template() ) {
    
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    add_action( 'genesis_after_header', 'genesis_entry_header_markup_open', 11 );
    add_action( 'genesis_after_header', 'genesis_do_post_title', 12 );
    add_action( 'genesis_after_header', 'genesis_entry_header_markup_close', 13 );
    
    }
    
}

You can also use a conditional tag to exclude the blog page template in genesis.

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems