OllieWP / ollie

A finely-crafted WordPress block theme by Mike McAlister
https://olliewp.com
GNU General Public License v3.0
361 stars 48 forks source link

Header Patterns not available in new Template Part Header #26

Closed pmmueller closed 1 year ago

pmmueller commented 1 year ago

Describe the bug The Header Patterns are not available when adding a new Template Part Header. They seem to be wired to Templates only.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Website Editor > Template Parts'
  2. Click on 'Manage All Template Parts'
  3. Click on 'Add'
  4. Give it a name and add a new template part Header
  5. Edit the new Header
  6. Open the Block Inserter
  7. Change to Patterns
  8. Header Patterns are not available

Expected behavior Shouldn't the Header Patterns be available when adding a Template Part, just like they are when I open a Template, select the Header and choose Header > Replace?

Desktop (please complete the following information):


I report this what I believe to be a bug because I really like Ollie after playing with it for about an hour. Thank you for this very promising block theme.

mikemcalister commented 1 year ago

Hey Peter! Thanks for the heads up. I've just made a few changes and pushed them to the develop branch. You can check out the fix there, or you can wait until I push a new release, which should be in a few days. You should now be able to access those patterns site-wide.

Just another little tip that may be helpful. When you want to replace the header design, you can use this little trick to quickly replace the design.

Screen Shot 2023-05-01 at 4 01 22 PM

Click on the Header template part, click the dotted menu, and then click Replace Header. It will bring up a pop-up where you can choose a new header design. 😎

pmmueller commented 1 year ago

Thanx for the quick reply and the fix. I will check out the update one way or the other.

Also thanx for the tip and the screenshot. I know "Replace Header" and I use it, but when I show changing a header in the website editor to newbies I prefer a different workflow:

  1. I explain that a template part is a reusable module.
  2. Then I let them consciously create an empty template part.
  3. Finally they fill the template part with a pattern of their choice.

That way they experience the difference between parts and patterns and have created a reusable template part that they'll remember when they see it.

The reason I prefer this workflow is that if you choose a pattern in Replace Header the website editor will create a template part with the same name as the pattern without telling anyone. Which is fine.

But: that way newbies don't experience the difference between a template part and a pattern. They don't know that a template part was created for them to reuse in the next templates.

So when they change the header in the next template I've seen them ignoring the template part presented at the top of the list and head straight for the pattern again, as that seemed to work well the first time. So now they have two template parts with identical names and don't know that these exist.

And that's where confusion sets in, especially when they repeat this procedure for three or more templates creating x identical template parts.

So a lot of question marks pop up when they at some stage open the list of Template Parts in Browse mode and see x identical entries ...

So thanx for fixing that ;)

mikemcalister commented 1 year ago

Hey Peter, thanks for sharing that additional context, very helpful. The fix should be available in a release soon!