WP Customizer show div
-
I’m working on my theme customizer and am trying to find a more efficient way of showing a div
Currently, what works for me is:
(this is the section)
$wp_customize->add_section('social-networks', array((and this is what im using to display a div if any options are selected)
<?php if ( ( !empty(get_theme_mod('facebook-link')) ) || ( !empty(get_theme_mod('instagram-link')) ) || ( !empty(get_theme_mod('linkedin-link')) ) ) : ?> <div class="display-social-div"></div> <?php endif; ?>This works, but is there a simpler way to show the div if any of the setting/controls are checked inside the social-networks section, instead of having to list out each setting/control to see if they are checked? I have about 20 setting/controls and only showed 3 as an example here….
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘WP Customizer show div’ is closed to new replies.