Cannot save settings value
I needed to change the name attribute of the field from name=”rma_options[rma_base_url]” to name=”rma_base_url”
I needed to change the name attribute of the field from name=”rma_options[rma_base_url]” to name=”rma_base_url”
You can use auth_cookie filter to set an expiration time of 0. This will make sure that the cookie is only valid for the current browser session. For password expiration you can use a plugin like: https://wordpress.org/plugins/expire-passwords/ Pls also see: Destroy user sessions based on user ID
The option group (1st param to register_setting()) is not stored anywhere. The only use for option groups is to output a couple of hidden fields and a nonce, via a call to settings_fields().
Instead of url: ajaxurl + “?action=fdiAddFavorite”,, use two lines like this: url: ajaxurl, action: “fdiAddFavorite”, Then at the end of fdiAddFavorite(), you try something like this: echo $favorite_list; // could also send message like “success!” wp_die();
If you haven’t seen it already I would have a look at the posts-to-posts plugin. It allows association between users and posts. the documentation for post<>users code examples is here.
/** * Enqueue stylesheet before others */ class EnqueueStylesheetEarly { function __construct() { add_action( ‘wp_enqueue_scripts’, [ $this, ‘load_before_other_stylesheets’ ], 5 ); } /** * Register and enqueue stylesheet */ function load_before_other_stylesheets() { wp_register_style( ‘bootstrap-css’, plugin_dir_url( __FILE__ ) . ‘bootstrap.min.css’, [], ‘3.3.7’ ); wp_enqueue_style( ‘bootstrap-css’ ); } } Then you can load this with your other … Read more
change echo ($instance[‘$jd1’]); echo ($instance[‘$jd2’]); echo ($instance[‘$jd3’]); to echo ($instance[‘jd1’]); echo ($instance[‘jd2’]); echo ($instance[‘jd3’]); so basically remove the $
Have you checked WP Advanced Search ? I think that will make the solution for you.
Ok, I figured it out (finally) Instead of using the code above to add a new custom field, I changed it to this: add_filter( ‘woocommerce_checkout_fields’, ‘custom_override_checkout_fields’ ); function custom_override_checkout_fields ( $fields ) { $fields[‘order’][‘the_script’] = array ( woocommerce_form_field ( ‘the_script’, array( ‘type’ => ‘textarea’, ‘class’ => array(‘extracheckoutinfo form-row-wide’), ‘label’ => __(‘What is the script?’), ‘placeholder’ … Read more
WordPress environment not loading properly