Open phgDigital opened 7 years ago
.btn-brand
class that modified a Bootstrap button to use the primary color.Edit: Regarding font sizes, I want to keep them set for now.
For all of these, lets check out some other themes out there and see what they're doing with the Customizer to combat these problems.
Few more: Footer Widget Area Background Color Footer Widget Area Text Color Footer Text Color
I installed a couple other themes to see how they use the Customizer and here are some more ideas.
They have sections nested within other sections. I love the idea of this to organize the options better. One has an entire section dedicated to Typography. One allows the layout to be controlled by the Customizer (sidebar left, right, or full-width).
This one also controls the dynamic content sections via the Customizer, too (instead of custom fields or widgets).
I think many of the settings interface that these are using are not WordPress core... which I don't think we should go down that rabbit hole. I'd like to find a way to keep all of our Customizer interface options to WP core.
Another theme has a dropdown option for background positioning as well as a dropdown for preset "skins" (or schemes).
It also had a separate section for individual post features:
This one also had an option for completely different footer layouts... If we wanted to make multiple footers we could- we could keep them in a directory within /includes
. This would be a way down the road thing, though.
Ok, to nest sections we simply need to create Panels.
$wp_customize->add_panel('test_panel', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => 'Test Panel Options',
'description' => 'Several settings pertaining my theme',
));
$wp_customize->add_section('test_section', array(
'title' => 'Test Section',
'priority' => 50,
'panel' => 'test_panel',
));
$wp_customize->add_setting('test_setting', array('default' => null));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'test_setting', array(
'label' => 'This is a test',
'section' => 'test_section',
'priority' => 10
)));
Maybe we should have a quick whiteboard meeting to organize all of these (and plan out new ones). I'd be more inclined to have more micro-settings now that we can really organize them well.
Another thing I was thinking- instead of inlining each of the Customizer styles, we could hook into the wp_head
at 200
and echo an embedded style tag with all Customizer style overrides.
We'd have to write it as raw CSS, but so far they haven't been more than one line each.
Most link colors across the site should be fixed now.
Some more thoughts on organization:
Here's where we ended up after the workshop:
See the checklist in the next comment down for actual implementation of those options.
Bold are panels Italic are core WordPress options
Bold are panels Italic are core WordPress options
We could use Bootstrap classes to control which side the sidebar is on, so that could be a new option.
Here's the Bootstrap method for how I'd do this:
<div class="container">
<div class="row">
<div class="col-md-8">
Content
</div>
<div class="col-md-3 flex-first"><!-- flex-first would be inside a conditional -->
Sidebar
</div>
</div>
</div>
Took care of the sidebar while I was in there adding the one-color logo options.
I got the post meta options in, but we need to test it because I'm not 100% sure I got the default logic right.
I feel like week could add a few more options here for customization.