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')) ) ) : ?> <?php endif; ?>
This works, but is there a simpler way to show the div if any of the setting/controls are checked, 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….
-
Hi there,
Looks like you’re in the wrong forum. It appears that you’re using the open source WordPress.org software and you need to seek help at these forums:
https://wordpress.org/support/forums/
These forums are for WordPress.com hosted sites only. If you want to know more about the differences between WordPress.com and WordPress.org you can read this document:
- The topic ‘WP Customizer show div’ is closed to new replies.