Hot answers tagged

4 votes

add_post_meta when jQuery button is clicked

WordPress Ajax to the rescue! You'll need to open up a function in WordPress that can be called via a javascript function, which is what the WP Ajax API was built for. It's a bit of a multi-step ...
Greg Burkett's user avatar
1 vote

jQuery - Make multiple field Required with warning at WP Admin backend

I fixed the issues by replacing default HTML warning message using function setCustomValidity(). The default HTML warning message is issued at invalid field so that users know where to correct: /...
daro2013's user avatar
1 vote

Help with AJAX request

The code you provided is on the right track, but it's possible that the issue you're facing is related to WordPress's admin-ajax.php handling. Here's how you can modify your code to make sure you stay ...
Tushar Sawant's user avatar
1 vote

CF7 Populate Text Field Based On Checkbox Checked

assuming it is input text field, changing a text field should use $("#one-control").val("one-hidden");
Laurence Tuck's user avatar
1 vote

Check if user is logged in using JQuery

I am using an alternative way without ajaxurl and body class. I just don't trust the body class, that might not exist in all of the themes. In functions.php you should have: add_action( 'wp_body_open',...
Sisalik's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible