Reputation
Next privilege 100 Rep.
Edit community wikis
Badges
9
Impact
~4k people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Sep
14
awarded  Popular Question
Jul
9
comment Ajax function on #publish only saves as draft - how to make it publish?
Brilliant! This did the trick. Thank you so much!
Jul
9
accepted Ajax function on #publish only saves as draft - how to make it publish?
Jul
9
answered Custom Post Type Organisation - Taxonomies, Categories and Pages
Jul
9
comment Ajax function on #publish only saves as draft - how to make it publish?
Sisir - the server side code doesn't do anything related to publishing. I am not using wp_insert_post() or any other functions to create the post - I am letting the "Publish" button create the post. All the server side code does is compare meta fields to existing posts, and if there is a conflict, it returns "stop" and if there is not a conflict, it returns "go." The $('#post').submit(); in the JS is what publishes the post.
Jul
9
asked Ajax function on #publish only saves as draft - how to make it publish?
May
24
accepted Can't trigger an AJAX function with a submit button in the dashboard
May
24
comment Can't trigger an AJAX function with a submit button in the dashboard
However, your suggestion to do $('#your_form_id').submit(); does help immensely. I still don't know why it can't find the PHP function when clicking a submit button triggers the event, but at least I can prevent the default action and then do the action later. Thanks!
May
24
comment Can't trigger an AJAX function with a submit button in the dashboard
Thanks, Mohammad! Unfortunately, that doesn't help. I have tried $('.button').on('click', function (e), $('#button-id').on('click', function (e), and $('#form-id').on('submit', function (e) and everything else I can think of. No matter how I target that submit button or form, it cannot find the PHP function.
May
24
comment Can't trigger an AJAX function with a submit button in the dashboard
The plot thickens! If I add e.preventDefault(); to the JavaScript, then it finds the PHP function. But I don't want to prevent the default form submission....
May
24
asked Can't trigger an AJAX function with a submit button in the dashboard
Apr
23
answered Plugin translation not displaying
Apr
23
answered How to list all names and descriptions of a custom taxonomy
Apr
22
asked Plugin translation not displaying
Feb
18
answered Ways of managing staging and production wordpress sites?
Jan
16
answered Running a custom query inside another cpt single and trying to grab a variable
Sep
24
awarded  Autobiographer
May
18
comment Problems with redirecting a BuddyPress custom subnav item
Yes, that works! Thank you!
May
18
accepted Problems with redirecting a BuddyPress custom subnav item
May
17
asked Problems with redirecting a BuddyPress custom subnav item