-
Notifications
You must be signed in to change notification settings - Fork 361
Try: Add hide site header/footer Customizer options to Varia #2961
Conversation
@scruffian: I did the initial work to get this PR working in a similar way to #2985. I do a concern with the approach though: For Seedlet, we needed to make edits to both the child themes to get this working there. This wasn't a big deal because there was only one of them (Spearhead). It's going to be much more work to edit and test each of the 19 Varia child themes. I imagine some will be pretty straightforward, while others will need a bit of header/footer refactoring. This turns a relatively simple PR into something quite massive. While the CSS-Only approach wasn't great in that it relied on Any thoughts on how to make this easier? |
From looking at the code for the Varia child themes headers and footer I think they could benefit from some refactoring anyway, so I think it's worth doing it to keep these themes maintainable. What do you think? |
That sounds about right. 😄 I'll take another look tomorrow — if someone else on the team has spare time they're welcome to dig in sooner. |
Marking this as "To do", and removing my assignment since I don't think I'll have a chance to get to it this week. |
printf( __( 'proudly powered by %s.', 'varia' ), 'WordPress' ); | ||
?> | ||
</a> | ||
<?php get_template_part( 'template-parts/footer/privacy-policy', '' ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this is a change - previously the privacy policy was inside the wordpress.org link, but I assume that is a bug.
…themes into try/varia-header-footer-hide
…themes into try/varia-header-footer-hide
…themes into try/varia-header-footer-hide
varia/header.php
Outdated
</header><!-- #masthead --> | ||
|
||
<?php endif; ?> | ||
<?php get_template_part( 'template-parts/header/header', 'content' ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this code here:
<?php
if ( ( true === get_theme_mod( 'hide_site_header', false ) && is_front_page() && is_page() ) ) : return; // Return if this is the homepage and the hide-header setting is active. ?>
Then we don't need to repeat it in every template part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I believe for the header we will be able to do that, I will go ahead with that, thx
Thought so too. Maybe remove the background and keep the text black when the footer is hidden? This will affect color annotations by the way :D Maybe design input for this? @kjellr |
Probably this makes sense in a followup PR anyway. And maybe only if we get that feedback... |
…themes into try/varia-header-footer-hide
This PR tries out some new options in Varia:
This could come in handy for single-page sites like those in Automattic/wp-calypso#48381.
For now I placed these checkboxes in the existing Hopepage Options area, but they could be expanded if we want them to be global (or on specific pages). It's worth noting that you can already hide most of this stuff globally if you manually remove menus from the menu locations, and also check the "Display Site Title and Tagline" option under Site Identity.
This shouldn't be merged before we test it out in all the child themes! 😉
Screenshots
Default:
Site Header hidden:
Site Header & Footer Menu hidden: