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 1 year, 4 months ago.

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



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


    instead of like this:


    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:


    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).





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

    Cheers :)

    Web developer, Software & Electrical Engineer · I enjoy coding, helping developers, & solving problems
    Find Me: wpdevelopersclub.com | @hellofromTonya | @WP_Devs_Club



    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.