Trouble adding data to options table
Trouble adding data to options table
Trouble adding data to options table
If what posted is all the code you are using, you unsetting the value from the retreved array using unset, but then you don’t save again the array on database: add_action( ‘delete_user’, ‘forum_remove_deleted_user’ ); function forum_remove_deleted_user($user_id) { $user_obj = get_userdata($user_id); $subscbr_email = $user_obj->user_email; if( ! empty( $subscbr_email ) ) { $list = (array) get_option(‘mf_forum_subscribers_1’); if( … Read more
get_option( $option ) returns an array. You need to get access to that array, and then get the keys/values inside of it. Try this instead: $value = get_option( ‘my_option_name’ ); echo $value[‘my_option’];
I was able to find the answer!! The problem I was having was having multiple forms being submitted to the options database. I found a tutorial that solved this problem: WordPress Settings API: Multiple Forms On Same Page http://www.mendoweb.be/blog/wordpress-settings-api-multiple-forms-on-same-page/
Share content between two different sites in same domain
You can use the following two inbuilt functions to do this. switch_to_blog get_option You can use both in the following way to make a function out of it which would give you the option. Put the below in the functions.php file function wpse_get_options( $blog_id = 1 ){ switch_to_blog( $blog_id ); $get_option = get_option( $option ); … Read more
Slightly modified options framework Colour picker
update_option() updating the option with an empty value?
Move one option value into another option
Custom options – register, defaults and delete empty fields (Settings API)