Automattic / musictheme

A theme for bands and musicians that uses an experimental Gutenberg layout.
GNU General Public License v2.0
87 stars 11 forks source link

Add header background color templates #36

Closed kjellr closed 6 years ago

kjellr commented 6 years ago

Our old way of customizing the header background color required multiple steps and was difficult to find. For example, if you wanted to change the header background to white:

  1. From Document Settings, choose the "Hide Page Header" template for your page
  2. Add a full-width Cover Image as the first page item.
  3. Manually change the Cover Image color by adding a "white" custom class

This PR preserves that functionality, but also adds new page templates that shorten those steps. Here's how you'd do that with these updates:

  1. From Document Settings, choose the "White Page Header" template for your page

That's it! đź‘Ź

@allancole — I'd love some 👀.

allancole commented 6 years ago

This is executed perfectly!

Normally I’d be against multiple setup steps, but I actually think it makes sense here. With Page Layout blocks on the way this might prime users to start thinking the right way about them, while still giving them a way to do it with Blocks.

I wonder if we might want to do a similar thing for posts? I think there’s a way to turn on “Post Templates” in posts, but I could be wrong.

kjellr commented 6 years ago

I wonder if we might want to do a similar thing for posts? I think there’s a way to turn on “Post Templates” in posts, but I could be wrong.

You're right. Give this another spin and let me know if that's working for you too.

allancole commented 6 years ago

Excellent!

I only wish there was something visual that we could show in the editor that reflects the users color selection. I doubt thats possible at this point, so I’m okay with merging this as it is now.

Maybe we could start a separate enhancement ticket for that, but I also feel like Page Layout Blocks is where this would ideally happen.

allancole commented 6 years ago

Hmmmm. I wonder if we could swap out single.php and page.php for singular.php, ie: https://make.wordpress.org/core/2015/07/06/singular-php-new-theme-template-in-wordpress-4-3/

If there isn’t a significant visual difference between pages and posts, let’s go for the less code route ;-)

kjellr commented 6 years ago

Yeah! I think that makes a lot of sense for us. Since that goes a little beyond these individual templates, let's merge this in for now, and take care of that in a separate PR. đź‘Ť