Skip to main content
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

Metabox conditionals depending on post format and template in Gutenberg

Better way is to listen to Gutenberg events. Template change can be observed with something like this: => { console.log( 'core/editor' ).getEditedPostAttribute(...
Roman's user avatar
  • 134
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

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