Ajax url value to pass ‘variable’ to use in query

You say that the page URL is http://localhost:8888/dev_wordpress/wp-admin/admin.php?page=mfgroups&mingleforum_action=usergroups&do=add_user_togroup but you are trying to load http://localhost:8888/tankards_wordpress/wp-admin/wpf-addusers.php?usergroup=The+Freedom. Those don’t match is a number of ways, but I am not 100% sure what the relationship between the two is. Your question is not clear in that respect. However, even if you got that .php file to load via … Read more

Get post id on click of thumbnail

You need ajax. The html: <div id=”PersonBio”></div> <div id=”mainTextTitle”></div> <div id=”mainText”> <ul class=”faces”> <?php $categories = get_categories(); foreach ( $categories as $category ) { $i = -1; echo ‘<div class=”grid-row”><h2>’ . $category->name . ‘</h2></div>’; $args = array( ‘posts_per_page’ => -1, ‘cat’ => $category->term_id ); $cat_posts = new WP_Query($args); if ( $cat_posts->have_posts() ) : while ( … Read more

WordPress plugin ajax post parameter

In your jQuery code data = { action: ‘aad_get_results’, aad_nonce: aad_vars.aad_nonce }; you are passing only action and aad_nonce, you are not passing form data. If you want pass variables, you ave to pass it with ajax, use something like: data = { action: ‘aad_get_results’, aad_nonce: aad_vars.aad_nonce, form_data: $(‘#aad-form’).serialize() }; After that, in your aad_process_ajax … Read more

Ajax Form seems to post, but does not return

Your settings object in ajax call is not properly set up: action should be inserted in the data object. For example: $.ajax({ url: ajax_url, data:{ action: ‘trailer_report’,// action must be set here // other stuff here } //other ajax stuff }); Hope it helps!