Seperate plugin and theme files

You shouldn’t link directly to plugin/theme PHP files to handle requests for this exact reason – the WordPress environment won’t be loaded, hence your undefined function error. Since you’ve implemented a shortcode-approach to integrate with the theme, you could just point the form to itself (i.e. remove the action attribute) and then dynamically handle the … Read more

Sage wordpress add customize register

This is the solution for my question add_action(‘customize_register’, function ($wp_customize) { $wp_customize->add_section(‘copyright_extras_section’, array( ‘title’ => ‘Copyright Text Section’ )); //adding setting for copyright text $wp_customize->add_setting(‘text_setting’, array( ‘default’ => ‘Default Text For copyright Section’, )); $wp_customize->add_control(‘text_setting’, array( ‘label’ => ‘Copyright text’, ‘section’ => ‘copyright_extras_section’, ‘type’ => ‘text’, )); });