Enterprise Pro Changing Page Title Styles

Community Forums Forums Design Tips and Tricks Enterprise Pro Changing Page Title Styles

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  amelton48 3 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #112632

    amelton48
    Member
    Post count: 1

    Hello,

    I’m trying to customize a site I’m working on using the Enterprise Pro theme so that page headers appear like this:

    http://myg8.staging.wpengine.com/services/system-planning/

    instead of like this:

    http://myg8.wpengine.com/services/system-planning/

    Changing the CSS for the .entry-header produced the first example, but unfortunately it also had a slight side effect of making the front page look like this:

    http://myg8.staging.wpengine.com/

    Which I don’t want to happen.

    I’m wondering if there is a way to isolate the headers on pages, through adding an additional class to the .entry-header (or some other method I haven’t considered)? I’ve tried to create a filter, but unfortunately my php-foo is weak (and I may be fundamentally misunderstanding something about filters). Here is my attempt:

    function genesis_entry_header_markup_open() {
    	printf( '<header %s>', genesis_attr( 'entry-header' ) );
    }
    
    add_filter( 'genesis_entry_header_markup_open', 'page_header_background' 10, 3 );
    	function page_header_background ( $class ) {
    		if ( is_page() )
    			return $class;
    			
    		printf ( '<header %s>', genesis_attr ( 'entry-header page-title' ) );
    	}

    which just ends up breaking the test site when I put it into the theme functions. The other option I’ve considered is creating a new page layout that I can use, but my working knowledge on how to do that is weak (and I’m not sure it would actually solve the problem I’m running into anyway). If anyone can help, I would appreciate it (even if it’s just to point me towards a resource that I could dig into).

    Thanks!

    http://myg8.wpengine.com/
    #112667

    Tonya
    Member
    Post count: 180

    Hi,

    To add a custom class to the .entry-header <header> element, here is a tutorial I wrote.

    Cheers :)


    Web developer, Software & Electrical Engineer, Bringing ideas to life is my art
    Find Me: tonyadoescode.com | Twitter | GitHub | Customize without touching the child theme

    #112867

    amelton48
    Member
    Post count: 1

    Thanks so much, Tonya! That is exactly what I needed.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.