Trouble with WordPress Settings API: Form Submits When Fields Called Directly, Fails When Using Callbacks

Thank you for the responses Tom! You got me on track, I should have checked the rendered html earlier. Here’s the answer. The rendered html was showing hidden inputs, for clarity, I’ll just repeat my previous form with the hidden inputs that were being rendered: <form method=”post” action=”<?php echo admin_url(‘admin-post.php’); ?>”> <label>This form wont work</label> … Read more

Get variable from url

There were actually 2 issues. First, I had to use get_query_var. Secondly, for some reason Permalinks were set to a weird custom structure. It’s working now.

On profile update check if user is Subscribed to emails?

Roles in wordpress are case sensitive, I used the lowercase text for the same. Your function must return a value. add_filter(‘insert_user_meta’, function ($meta, $user, $update) { if (true !== $update) return $meta; //Check ’email_subscriber’ meta-key for the user $email_subscriber_meta = get_user_meta($user, ’email_subscriber’, true); // Check the user if it is subscribed by meta-value if checkbox … Read more

Translating the “Everything” filter menu in Quicksand jquery file

You should be able to pass the language across using wp_localize_script(). So you’re obviously enqueuing your own custom javascript file, lets say that file is called createlist.js. I assume you’re doing it like so: wp_enqueue_script( ‘createlist’, plugins_url( ‘createlist.js’, __DIR__ ), array( ‘jquery’ ), ‘1.0’, true ); (You’ll need to adjust the path for the JS … Read more