I have customizer sections and fields setup which work fine if I don't include wp_footer() in my theme. Can someone shed some light on what's forcing the section and hides to be set to hidden the customizer section? I have included a GIF of the sections hiding below.

(the page takes a few seconds to load and then once the page is loaded, the sections hide)

As I said, if I remove wp_footer() from my theme, they work fine. The data is being saved and loaded up in the template and all the fields appear on every page as part of the theme's global sidebar and footer.

  • might be scripts are conflicting, as wp_footer() loads all scripts you can inspect the hidden section and check are the html elements appearing or it is totally blank.
    – Harry
    Commented Mar 29, 2017 at 7:43
  • You really must include wp_footer() in your theme if you are to expect the customizer preview to work as expected. For more see core.trac.wordpress.org/ticket/37981 Commented Apr 2, 2017 at 5:56
  • @WestonRuter yeah fully aware. Was trying to find out what the issue was so wp_footer() could stay in my theme and the customizer sections stop being hidden Commented Apr 3, 2017 at 12:23

1 Answer 1

add_filter( 'customizer_widgets_section_args', function ( $args ) {
  $args['active_callback'] = '__return_true';
  return $args;
} );

Adding this to my functions.php file ensured that the settings stayed visible no matter what page was visible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.