Why does “get_option” pull in the older value in options.php, rather than the newer value, on submission of a form?
If your update_option call runs after you assign $posts1 and $posts2, then of course they’ll hold the “old” value, even if you sleep for eternity 😉 Either run the update earlier, or (re)assign the variables afterwards. $posts1 = get_option( ‘post1’ ); echo get_option( ‘post1’ ); // [my_id] echo $posts1; // [my_id] update_option( ‘post1’, ‘foobar’ ); … Read more