Reputation
2,552
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
7 22
Newest
 Custodian
Impact
~39k people reached

2d
comment Retrieve POST data from AJAX call
A solid summary in EDIT #2, @Fafanellu! On a final note, I did add a little formFieldsToObject() function to the jQuery solution which should fix the gross $_POST['newFormRecherche'][0]['name'] / $_POST['newFormRecherche'][0]['value'] problem =]
2d
comment Retrieve POST data from AJAX call
wp_die() is considered a better alternative to die(). It's rare to use either outside of AJAX handlers except for temporary troubleshooting - there is almost always a better way to handle a problem or report an error then to simply kill script execution!
2d
comment Retrieve POST data from AJAX call
Pretty much! This Codex page touches on it, briefly. The general idea is that after you've handled the AJAX request and echo()d a response, there's not much of a reason to finish WordPress's execution. If WordPress is allowed to continue to run as it normally would, there's a risk that code executed after your AJAX handler will echo() something else onto the response, which would likely break your JavaScript when your success callback tries to process it.
2d
comment Retrieve POST data from AJAX call
That's just a temporary placeholder for whatever your code would be =) . die() immediately ends a PHP script's execution, optionally echo()ing an argument, if supplied - so it will immediately end the AJAX request, responding with the form-data that the server received as a JSON object (though probably with the wrong Content-Type header, but jQuery shouldn't mind). In combination the success callback you specified in your JavaScript which console.log()s the server's response, you should end up with a nice, navigable readout of the form data in your browser's JavaScript console.
Apr
30
reviewed Reject Show custom taxonomy inside custom menu
Apr
29
reviewed No Action Needed Moving Categories submenu to Media, but still opens Posts menu
Apr
29
reviewed Reviewed Problem with Taxonomy Images plugin
Apr
29
comment Problem with Taxonomy Images plugin
Hello @VictorGomes - Welcome to the WordPress Development community! Unfortunately, questions regarding 3rd-party products are considered off-topic here as they require extremely intimate knowledge of very specialized code in order to answer well. Your question would be best addressed in the 3rd-party's official support channels. Please review the "How to Ask" page in our help center for more information about what constitutes a good question for our community.
Apr
29
reviewed Reviewed How to order users alphabetically by name? in plugin UPME
Apr
29
comment How to order users alphabetically by name? in plugin UPME
Hello @Diana - Welcome to the WordPress Development community! Unfortunately, questions regarding 3rd-party products are considered off-topic here as they require extremely intimate knowledge of extremely specialized code in order to answer well. Your question would be best addressed in the 3rd-party's official support channels. Please review the "How to Ask" page in our help center for more information about what constitutes a good question for our community.
Apr
29
revised Retrieve POST data from AJAX call
added 15 characters in body
Apr
29
revised Retrieve POST data from AJAX call
added 15 characters in body
Apr
29
comment Retrieve POST data from AJAX call
@Fafanellu it seems I gave jQuery more credit than is due - it doesn't like it when you use that key/value array in nested data structures, and actually fails to serialize it properly in such situations. I've added a little helper function that should set everything straight - the data should be accessible in PHP via a properly structured $_POST array, i.e. $_POST["newFormRecherche"]["field1"]. You can echo json_encode( $_POST ); in your AJAX handler, or var_dump( $_POST ); to see the exact structure of the form data.
Apr
29
revised Retrieve POST data from AJAX call
added 945 characters in body
Apr
29
revised Redirect all pages except one to homepage via .htaccess
added 34 characters in body
Apr
29
answered Redirect all pages except one to homepage via .htaccess
Apr
29
comment Add home page image slider and different sections
thanks for your understanding :) . If you run into problems while implementing something like this, we may be able to help more!
Apr
29
reviewed Reviewed Category Name in WP_Qurey
Apr
29
comment Category Name in WP_Qurey
Hello @YasenAhmed - Welcome to the WordPress Development community! Please review the "How to Ask" page in our help center - as it stands it is unclear what you are attempting to accomplish, what you have done so far, what problem you are running into, and how you have attempted to solve it. Please include only the code immediately relevant to the problem in a code-block within the question itself rather than linking it externally.
Apr
29
reviewed Reviewed Add home page image slider and different sections