1

I don't really know what to do now. :/ I tryed this:

add_action( 'admin_init', 'Setting_' );

And this is my strings and form setup:

function Setting_() {
    register_setting( 'options', 'My_plugin_header_logo' );
    register_setting( 'options', 'My_plugin_links_facebook' );
    register_setting( 'options', 'My_plugin_links_youtube' );
    register_setting( 'options', 'My_plugin_links_email' );
    register_setting( 'options', 'My_plugin_links_instagram' );
}

<form method="post" action="options.php">
  <input type="hidden"
         value="/wp-admin/options.php?page=my_plugin"
         name="_wp_http_referer">
  <p class="submit">
    <input id="submit" 
           class="button button-primary" 
           type="submit" name="submit" value="Save!">
  </p>
</form>

Thnaks for any help!

1 Answer 1

3

Fixed!

 function Setting_() {
     register_setting( 'Set_my_options', 'My_plugin_header_logo' );
     register_setting( 'Set_my_options', 'My_plugin_links_facebook' );
     register_setting( 'Set_my_options', 'My_plugin_links_youtube' );
     register_setting( 'Set_my_options', 'My_plugin_links_email' );
     register_setting( 'Set_my_options', 'My_plugin_links_instagram' );
 }
    
 add_action( 'admin_init', 'Setting_' );
    
 settings_fields( 'Set_my_options' );

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.