0

Is it ok to have each panel in separate file and then call it as below

function themeslug_customize_register( $wp_customize ) {
   require_once( get_template_directory() .'/inc/customizer/general-settings.php' );  
add_action( 'customize_register', 'themeslug_customize_register' );

Thanks in Advance.

  • Surely. You are free to structure your code at your convenience as long as it works and its easily readable. Cheers – JItendra Rana Apr 19 '17 at 11:52
2

Of course. In fact, I would consider requiring files in this way to be a best practice.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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