Ajax - The core of WordPress uses Ajax only in the administration screens. For instance, Ajax is used for instant updates when you are doing comment moderation, and when you are adding and deleting items from lists such as categories, blogroll, and posts; Ajax is also the technology behind the ...

learn more… | top users | synonyms

0
votes
1answer
17 views

How do I update_post_meta() or add_post_meta() with an AJAX call

I have a CPT called albums. The CPT have some custom fields, I want those fields to be blank in the post editor, so the person who is editing a post can ad a track to the album from the editor and ...
0
votes
1answer
8 views

adding ajax load more to display images from meta box

I am using metabox's advance file uploader to upload images. <?php $images = rwmb_meta( 'tj_file_advanced', 'type=image&size=YOURSIZE'); foreach ( $images as $image ) { ?> ...
0
votes
2answers
557 views

AJAX values converted to PHP Variables?

I just started playing with Wordpress and I have a question about the AJAX side of things. I think that I understand how the AJAX front-end to server side processing, back to font-end works. But, I ...
1
vote
1answer
992 views

Intergrating agile carousel to wordpress: how to write the ajax_callback function

json is totally new to me how to write an ajax_callback function for agile carousel to work in wordpress? Below is the jason data format that I need to write as php arrays for it could be parsed by ...
1
vote
1answer
26 views

Posting to admin-ajax from front end. Is this redirect ok?

I'm posting a form to admin-ajax and the redirect use to be within the success handler. That was taking too long to receive from the server then redirect, even though it was only a small json response ...
1
vote
0answers
15 views

Cannot update my options using wp_ajax

I have implemented wp_ajax in on my options page but the value of my options are not getting saved or updated. Here is my form: public function email_settings_form(){ // Set class property ...
0
votes
1answer
31 views

Passing form data via AJAX to REST API And displaying results

I'm new to WordPress but have been programming PHP for a long time... I searched a bunch of questions but couldn't find what I need. I have a page with a search form that contains a few parameters ...
0
votes
1answer
1k views

Replace link with form to pass variables to javascript / ajax

I'm sending a single variable to javascript/ajax via a link, but want to send via a form so I can pass user input as well. (It's for a plugin that interfaces with an Echonest Remix python script to ...
0
votes
1answer
5k views

How can items be programatically removed from Woocommerce shopping cart

How can items be programatically removed from Woocommerce shopping cart without refreshing the page - ie using AJAX?
0
votes
2answers
1k views

How to add a “ waiting” icon for an ajax in WP frontend?

This is my search js code for processing search : jQuery(document).ready(function($){ $('#searchsubmit').click(function(e){ e.preventDefault(); var searchval = $('#s').val(); ...
2
votes
1answer
207 views

How to save dismissable notice state in WP 4.2?

In WordPress 4.2 the is-dismissible class was introduced to allow notices to be dismissed. This code is working to add the notice. function prefix_deprecated_hook_admin_notice() { if ( ...
0
votes
1answer
2k views

Using AJAX to run SQL statement and populate dropdown

I am trying to create a search where the user selects two different bits of data from the database and it then prints some results that meet requirements. I know I need to use AJAX, or something ...
1
vote
1answer
2k views

Proper way to load a single post via Ajax?

I'm loading single posts via Ajax into a div that I have set up on my index page. Everything is working fine in this regard. I want to use history.js to push/pop the state so if users enter ...
1
vote
1answer
551 views

Shortcode in AJAX popup

I am trying to use a shortcode from Ultimate Facebook plugin to display a FB connect button in an AJAX popup and can't seem to get it work properly. I searched and used the solution given by djb in ...
0
votes
1answer
18 views

Loading post template that contains a nested loop with ajax

I'm currently working on a project where I'm loading a post with ajax. I'm using get_post() to get the post, setup_postdata() to setup the post data, and get_template_part() to load the template ...
3
votes
1answer
57 views

WordPress AJAX Login Screen

In recent versions of WordPress, when you have been logged in to the dashboard a while with the page still open, WordPress times out your session and opens a login box. This box appears in a little ...
4
votes
3answers
4k views

Infinite scroll / lazy loading with NextGen Gallery

I'm working on a project for a friend that involves a massive page with 3,000+ photos. See: http://www.thepurplepixie.com/projects/purple-pixies-people-project/ Currently, I have pagination set to 50 ...
-3
votes
0answers
48 views

Post rating without plugins?

Is there any simple post rating snippet which will work when page is cached. There is many functions, for example this: <form method='POST' action=""> <input type=hidden name=rate ...
0
votes
1answer
19 views

Can't load search results with ajax

I'm trying to load search results on my page without reloading. I tried multiple approaches already, but I still can't make it work, despite using someone else's confirmed solution. Please find the ...
0
votes
0answers
28 views

Category filter with load more ajax

What I am trying to do is to do an Ajax request to filter posts on category click depending on the category id, then apply load more posts by ajax. Problem: when I fire the ajax call by clicking on ...
0
votes
1answer
31 views

Allow user to Upload image and manipulate it on the frontend

The site I am working on allows users to post things up for sale. In the form for creating their post, there is a simple file upload field. The problem is that sometimes when users upload images they ...
0
votes
1answer
573 views

Form isn't inserting data into database with ajax plugin

I've been working at this for weeks without success. I've figured out problem after problem with the code, but none of the corrections seem to fix my core problem. The form doesn't insert anything ...
0
votes
1answer
3k views

Ajax page load without reload

I am working on a script to load my page without refreshing. It is working as I want it except for one thing. The test site I have up is http://dev.dog-company.com . Only home About us and FAQ will ...
-2
votes
1answer
27 views

How to get posts from external website with tags common using ajax Json? [closed]

Plzzz How to get posts from external website with tags common with current post using ajax Json and show it in my website.
0
votes
0answers
25 views

Is there a hack for using is_page() within the function.php file?

I've created a function in my functions.php that's called when the submit_form event is fired on the front-end. Here is the code: add_action( "wp_ajax_nopriv_submit_form", "submit_my_form" ); ...
0
votes
0answers
8 views

How to create a wordpress search with ajax with Relevanssi - A Better Search plugin

I am using Plugin Relevanssi - A Better Search for search with only words and phrases not only letters matching.And now need to change the search and create it with ajax but didnt know where to start, ...
3
votes
2answers
381 views

How to modify wp_ajax function?

I want to modify wp_ajax_find_posts function. It receives search string from find-posts form and delivers search results by ajax. Part of the function looks like this: function wp_ajax_find_posts() { ...
0
votes
0answers
22 views

Woocommerce ajax checkout submit

So, in woocommerce, when a product is purchased, the user is redirected to "review-order" page. I am tying to make it so that the "review-order" page is instead shown by ajax on the product page ...
0
votes
0answers
29 views

ajax returns -1 in multisite sub domain

i am using the same theme for 2 language site - i didnt use a plugin but rather created a multisite (i like it better) - but... i have a problem with ajax which seems to work for main site but not ...
1
vote
1answer
3k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
0
votes
2answers
796 views

admin ajax php success returns 0

I have looked over many posts on here and other websites and nothing I do seems to work. What I am doing is, I have a custom template file and inside that file I have a div that I want to populate ...
0
votes
2answers
384 views

Show selected images on top in Media Manager

I've searched numerous StackOverflow and Wordpress Awnsers questions, but I couldn't find any solution that matches my situation or even remotely points me in the right direction. I have a custom ...
0
votes
0answers
27 views

Weird admin-ajax.php problem

In my site, each request on the home page is also making a POST to wp-admin/admin-ajax.php. 10.30.4.122 - - [21/Aug/2015:06:07:53 -0400] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 275 ...
1
vote
0answers
45 views

template_redirect or admin-ajax.php?

My plugin needs to be reachable by the public and accept query vars. When called, it will run some backend db tasks, call a 3rd party API and sometimes redirect. Previously, I was using ...
1
vote
1answer
492 views

Retrieving JSON data in ajax request from media uploader

I'm having some problems getting my JSON data that's being passed via an ajax request. I'm trying to implement the media uploader into a plugins settings page. I've got it functioning properly using ...
0
votes
1answer
30 views

First time doing Ajax with WP, how to do it?

I have been trying to work this out from various posts over the years but just can't seem to get it to work as I am not a Jquery guru and I am struggling to get my head around it. My html: ...
2
votes
2answers
603 views

update_user_meta doesn't work with AJAX

I try to keep user subscription in a metadata var. The function is called by AJAX. Ahe AJAX is called but the metadata does not seem updated on frontend. Here is the code: jQuery <script ...
0
votes
1answer
2k views

wp_handle_upload returns empty error array

I am trying to do an upload via ajax and really dont want to use the regular wordpress media uploader. It is too much stuff and all i want to do is upload single image. I have everything working the ...
0
votes
2answers
652 views

How to use ajax in wordpress plugin to get data from coustom DB?

i have created php script that work great as stand alone. now i need to create this script as wordpress plugin. so i have created custom table in wordpress DB. then i tried to make the ajax call. in ...
0
votes
0answers
32 views

[jQuery]Autocomplete and $.post

I managed to solve it using Sisir's push in the right direction. Here's the javascript function: function render_edu_hook_javascript() { ?> <script type="text/javascript"> var ...
0
votes
2answers
38 views

wordpress ajax contact form - error 500

I've tried to create a simple ajax contact form plugin. all things seems good till user push the "send" btn. it sends error 500. this is my script.js codes: jQuery(document).ready(function(){ //Get ...
0
votes
0answers
9 views

Loading ajax does not run through filter the_content

I have created a quiz page with a list of question. I use ajax to load the question content into the quiz. However, only the first question which loaded directly (not through ajax) render correctly. ...
0
votes
1answer
35 views

Can't pass the variable from a select to PHP query

I'm trying to make a dependent drop down with AJAX. I managed to get the chosen variable but I can't pass it to the PHP. Here's my code: action.js window.onload = function($) { ...
0
votes
0answers
24 views

To get the data from the Database is not working?

The below code is reponsible to display a dropdown options that while selected a options a google map was appeared. But when I put the shortcode into my page the options are being shown. But the ...
0
votes
0answers
40 views

Wordpress ajax load more returns duplicated posts

I'm trying to load more posts from my custom post type via ajax call, it sounds like i'm doing everything alright but one thing which is causing the duplication issue. My load more button does work ...
0
votes
0answers
50 views

WordPress AJAX File Upload - FrontEnd

So I have been reading through every WordPress front-end AJAX file upload tutorial I can fine. Nothing is working for me at the moment. The one that makes the most sense to me is this one: ...
0
votes
1answer
43 views

I have to post data by AJAX in wordpress to another Website

I have to post data by AJAX in wordpress to another Website (http://123abc.com/register) .But I always get Error .This is my jquery AJAX code: <script> $(document).ready(function() { // ...
0
votes
0answers
29 views

After wordpress widget save (ajax call) tinymce editor gone, data not saved

I have made tinymce editor for textarea fields in widgets. I'm enquing scripts: wp_enqueue_script('tinymce', home_url() . '/wp-includes/js/tinymce/tinymce.min.js'); wp_enqueue_script('tiny', ...
0
votes
1answer
650 views

Load more posts with multiple queries

I've been developing a theme which uses the load more ajax plugin, everything is setup and working great with the main query. But, once I setup a new query for popular posts, the load more posts ...
0
votes
1answer
120 views

AJAX login without a plugin does not work. when add a action to function.php

I am using wordpress ajax login without a plugin. I want to not be allowed users access to the WordPress profile after login, Because i have designed a specific profile in the link: ...