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
2answers
2k views

Ajax not firing properly using Firefox, but works in Chrome

I'm working on a plugin that seems to be fine in Chrome, but is not firing the PHP script via Ajax in Firefox. It is driving me to distraction. Here are the code blocks that relate to it. First, the ...
0
votes
1answer
28 views

Looking for a better way to handle an ajax script that pulls in post data on click

I've developed a template page that displays a grid of "employees" (a custom post type). That part works fine, but I also needed to set up a lightbox to display additional details on click. To avoid ...
0
votes
0answers
15 views

Widget save brake jQuery [duplicate]

I have created a plugin that creates a widget. On the widget form i am using jquery functions that i load using wp_enqueue_script. When adding the widget on a sidebar, everything works. Then when i ...
2
votes
0answers
18 views

Development of a Wordpress Search Plugin - Best Practices

Searching for around two days to find an answer to my question, I finally registered for this StackExchange. :) My Question is not simple, so I need to start at the very beginning. But to give you an ...
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
1answer
15 views

Apply filters when loading post via ajax

Have been trying to solve this for couple of hours already. Here's the case: I'm making a plugin that separates the posts into pages using the <!--nextpage--> tag. It works fine but I want to ...
0
votes
1answer
692 views

Load php function with AJAX on modal window

On a movie information wordpress theme i am developing, i have an href with text "watch trailer" on each cover of all movies. This brings a modal window, and that is working already, but i want to ...
1
vote
0answers
20 views

How to load paginated post pages via ajax

Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
0
votes
0answers
13 views

Multi-step Frontend Filtering to Reveal Content

I'm not even really sure the best and easiest way to go about doing this - or what the right verbiage is to properly describe what I'm wanting to do. On my site I'm looking to change this selection ...
0
votes
2answers
841 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
480 views

the_content() shows shortcode instead of parsing it

I'm loading a given post data via Ajax. The problem is that a plugin's shortcode is not parsed. The plugin is "Ninja Forms". It outputs [ninja_forms_display_form id=5] Instead of rendering the ...
-2
votes
0answers
20 views

Wordpress built in Suggest

My search form .php <form name="pjsearch" id="pjsearch" method="POST" action="<?php bloginfo('url');?>/search-results/"> <div id="pjcatform"><input type="text" id="pjcat" ...
0
votes
1answer
6k 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?
2
votes
1answer
62 views

How can I reuse the Wordpress search form for a custom plugin / widget?

I need to develop a custom widget to display posts, based on their ID. The user must be able to handpick posts. Right now, they can enter the post ID, but it is not convenient for them. Is it ...
4
votes
2answers
1k views

is_admin() returns true when using admin-ajax.php from front end script

Had a situation today where I was using admin-ajax.php from a front end script. As I understand it this the wp way to make ajax calls (registering my function with the wp_ajax_nopriv_myfunction hook) ...
-1
votes
0answers
12 views

Getting the response returned through a script

I'm trying to create a custom payment gateway in Woocommerce. I should send the data in the order from to another website, get the response, and then act according to that response. I want to use ...
3
votes
1answer
86 views

Retrieve POST data from AJAX call

I have the following JS script : jQuery('#form-recherche').submit(ajaxSubmit); function ajaxSubmit(){ var newFormRecherche = jQuery(this).serialize(); jQuery.ajax({ ...
0
votes
1answer
17 views

Help to upload post attachments from Ajax

My problem is that I cannot upload post attachments from a frontend form. I send data through AJAX to my php files containing functions. Let me be clear: everything is working great, the post is ...
0
votes
0answers
23 views

Ajax and form action [closed]

I'm using Zajax plugin for page-loading. It's impeding the action of a PayPal add-to-cart form and preventing the desired action and delivering a 'failed to load' error. Is there any code I can add ...
1
vote
3answers
30 views

AJAX call returns 0

In spite of many similar posts, all the proposed solutions didn't work for me, so here we are. I have the following script : jQuery('#term').keyup(ajaxChange); function ajaxChange(){ ...
0
votes
1answer
503 views

change attachment custom field onChange event

The form is in post creating window. Ajax is posting values, but the values doenst renews. Where can be problem ? Ajax <script> function dynamic_Select(field, aid, value) { ...
0
votes
1answer
3k views

wp_query->max_num_pages always returns 0 on custom post type

Hi there I am developing a theme where I have to load some posts with ajax, in my index page everything works properly, the problem is when I need to use it on custom post type, I pass the values for ...
-1
votes
0answers
24 views

Woocomerce API + Angularjs with Tokens [closed]

I am trying to connect to woocommerce api & angularjs, I already created the token through the woocommerce settings, and use angular "http get". In the past i tried to send tokens through a header ...
0
votes
1answer
461 views

AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0

For years I've set up php ajax calls and responses in my plugins like the following, with js error detection conditions as needed like... if( "<e>" == msg.substr(0, 3) ) { do_something(); } ...
-2
votes
1answer
33 views

How to use search-everything plugin with ajax? [closed]

I'm using this plugin: https://wordpress.org/plugins/search-everything/ I cannot figure out how I could code for having it working with ajax instead of loading the search page. I could code quite ...
2
votes
1answer
662 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
433 views

Multiple wp_editor instances in custom post type using Ajax

In a custom metabox, I need to generate a tinny wysiwyg wp_editor everytime we click on a button.. I struggled a lot with this and couldn't achieve it. The js $.ajax({ url: ajaxurl, data: ...
-4
votes
1answer
41 views

Widget won't work due to old JavaScript? Any ideas how to make it work? [closed]

I was trying to add this widget to my blog <!--BEGIN PROFILE WIDGET--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" ...
0
votes
0answers
25 views

Not getting any response from AJAX when formdata is used

I am new to the forum. I am facing a problem submitting file uploads through ajax. After doing some research, I found that using formdata is an option.However, I am not getting any response from ...
0
votes
0answers
13 views

Rating from a mobile app

I am looking for a way to allow my users to submit post ratings from my native mobile app. I have found this plugin : https://github.com/lesterchan/wp-postratings The calls are made by ajax to : ...
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
33 views

WordPress Ajax Not Working ( Custom Admin page)

I tried to do a small thing using Ajax. I just try to replace a div. This is what I have done so far. I created a admin menu using add_menu_page. Then I add a form to that page with a text field. ...
3
votes
2answers
425 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
17 views

How can I set cookies on both secure and non-secure origins at the same time?

I have a front-end login process via admin-ajax.php. It's a standard user/pass form so I submit the POST request to a secure, https, endpoint regardless of whether the user is currently on a secure ...
0
votes
1answer
3k views

Display data on same page as form without refresh

I am not sure if there is something about wordpress, or what I am doing, but I can not get online tutorials to work when implementing in a page template. For example this ...
0
votes
2answers
500 views

apply_filters, EMBEDS and AJAX not a friends?

I encountered a problem... There is content that contains a YouTube link Lorem ipsum bla bla bla http://www.youtube.com/watch?v=nTDNLUzjkpg My plugin display this content with that code in the ...
1
vote
0answers
13 views

Nonce fails on ajax save

I have made options page with 2 forms and two separate nonce fields, and other input fields that I save with AJAX. The issue is that every time I save and call my function to save options via AJAX I ...
0
votes
1answer
19 views

Setting value of session with Ajax not working

I´m kind of new to using Ajax but I am trying to update the value of a session using Ajax. The Ajax call shoud fires when clicked on a button. When I click on this button it also returns the succes ...
0
votes
2answers
586 views

WP_Session not acting with AJAX

The concept is to put a Button in Post Content which the user will click. Two things - The ID of the post and Number of times the user clicks the Button should be displayed. Reason - With this we ...
0
votes
1answer
490 views

Wordpress ajax success response

I'm trying to create a contact form in Wordpress using wp_mail and ajax The emial works but I'm having problems with the ajax success reponse. After the email is sent I need to show the user a ...
0
votes
0answers
22 views

Frontend Post with JQuery AJAX to Php Issue

My problem is the following. I'm trying to make users publish custom post_type by frontend through a form like this: <form id="msform" enctype="multipart/form-data"> <fieldset ...
11
votes
1answer
6k views

How to check if I am in admin_ajax?

Right now for my plugin, I am using in_admin() to determine if the user is in the frontend of the site or in the admin area. However, the problem occurs when plugins use admin_ajax.php to process ajax ...
0
votes
2answers
5k views

Accept AJAX call with serialized form data

I'm trying to pass a wordpress plugin some form data via ajax and it works just fine, unless the form data is serialized, then the server responds with an error message. I'm stuck with this for days ...
0
votes
0answers
29 views

Reload specific divs after login

My problem is the following. I've a form which I want my guests users to fill out before completingit. So before the last step I place a sliding down jquery/ajax form for login/register to show the ...
0
votes
1answer
34 views

Load next post by ID on a single page

I hope this topic is not duplicated. I see some similar topics but non of them can solve my problem, so I decided to put a new one. Here's the case. I have a single.php post with the defualt ...
2
votes
0answers
28 views

How to implement secure frontend image upload? [closed]

I would like to implement an public image upload in my Wordpress Theme with ajax. What's the secure way to do this? I have read many about security problems when allow users to upload files to the ...
0
votes
1answer
13 views

Interim-Login form on frontend

I have a few pages on the frontend of my site in which my users author content. This content can take many hours to create. Unfortunately, my site has a 4-hour session limit, and by the time my users ...
0
votes
0answers
508 views

Pull & display new comments without refreshing the page

I've just managed to implement ajax on comment submission and now members don't have to leave the page when they comment but still have to go one extra mile when they want to see new comments. I've ...
0
votes
1answer
54 views

Wordpress File handle - fopen, fwrite not working with $.ajax or $.post Jquery

I am making some log for all the action done in the site that can be store in a .txt file. my php code in working fine when doing a normal load, but when i use ajax it seems like i doesn't read the ...
-1
votes
0answers
17 views

ACF Fields Rendering on Ajax Loaded Pages

I am having some difficulty of displaying all the fields present in a group on front end. Actually, I am using Ajax Tabs so it's not working the way it should. The code is working on single-phones.php ...