Tagged Questions

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
55 views

AJAX – SHORTINIT set to TRUE returns blank

Thought I'd take this nifty shortinit trick for a spin. However, when I include this in my custom ajax handler, I get no response from my callback. If I comment it, it works just fine. Anything ...
0
votes
1answer
208 views

Add Infinite Scroll to Ajax Loaded Category Query

Update: This has been resolved. See update below. Following a few different online tutorials, I've managed to create a function to modify my post display via Ajax based on a category selected from a ...
0
votes
1answer
40 views

how to use wp_editor() here am getting empty result

<p> Messenger: <br /><?php wp_editor( '', 'mailling_messenger1', $settings = array('mailling_messenger1' => post_content) ); ?> <p> here am using wp_editor to get mail ...
1
vote
1answer
115 views

Ajax call in wordpress not working for subscriber user in front site

i have simple wordpress form to add data in custom table in wordpress using Ajax my Ajax code jQuery.ajax(ajax_object.ajax_url, { type: "POST", data: data, cache: false, ...
0
votes
0answers
13 views

Where should i put my php script for ajax implementation in wordpress? [duplicate]

I want to implement ajax on a page . i create a folder under plugins and put php page there and it works(when i gave the correct path in jquery). But when i try to call any WordPress functions it ...
0
votes
1answer
337 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
1answer
53 views

Data from ajax not updating post meta

I can not update the meta from this ajax. Can someone give me a direction to help me to resolve it. I have a select field. I need to grab his value, make some work with that value and then, add it to ...
0
votes
0answers
63 views

Unable to process ajax call for login form plugin

I am very new to PHP and WordPress plugin development in general. I am trying to create a plugin that shows a modal popup form for login and registration. When I try to submit the form that is ...
0
votes
0answers
54 views

Send post id through ajax and get the post content back

First of all i want to say that I am a WordPress beginner :). I am trying to get a post content in a modal by using ajax. So i send the id through ajax, but i cannot execute the php code anywhere on ...
0
votes
0answers
22 views

My Ajax Query is returning the contents of the page itself

I am attempting to execute the submission of a form in AJAX. function rapid_form_callback() { global $wpdb; $table_name = $wpdb->prefix . "my_client_here"; require_once( ...
1
vote
0answers
97 views

CPU usage: AJAX and Heartbeat API on admin pages

My (shared) web host recently sent me this: "Our server monitoring systems keep indicating high server load persistently maintained by your website (...). Most of the hits are to the ...
0
votes
1answer
308 views

AJAX fileupload - TypeError: not a function ajaxSubmit()

I have a plugin that works as a standard POST but not as an AJAX POST request. I am getting a not a function error in Firebug with this function: TypeError: jQuery(...).ajaxSubmit is not a function ...
0
votes
3answers
33 views

wp_ajax action responds with 0

I'm writing a plugin. There is a button, that triggers an ajax-request to an action I added in my plugin page: Head of my plugin PHP file: add_action('wp_ajax_update_nav_items', 'update_nav_items' ...
0
votes
2answers
40 views

Check ajax triggered from front-end or from dashboard

I have ajax method, user can trigger the same from either dashboard or from front-end. I just want to get from where the ajax is triggered. Is there any way to find? I tried is_admin method but it ...
0
votes
0answers
16 views

When I update a post and at the same time trigger an ajax request, post request is cancelled

When I update a post and at the same time trigger an ajax request, post request is cancelled. I have a video that proof this behavior.http://screencast.com/t/w2YwDGmWCg
0
votes
0answers
50 views

How to load post_meta for custom post type via Ajax

I'm trying to load a YouTube video via ajax outside the loop. I have it working on regular pages, but not anything loaded via ajax. A user would click a button, then a YouTube video will load via ...
0
votes
0answers
56 views

PHP switch and AJAX display WordPress post

I have a world map on a WordPress page. I'd like to load a particular post onto the page depending on what region of the map is clicked. I'm writing this as a plugin for my site. Here is what I have ...
0
votes
1answer
33 views

Manually cache a special, non-WP-but-using-WP page (e.g. Ajax results) with W3TC

Under the active theme folder, I have a search-autocomplete.php file which uses various WP queries to create smart JSON results delivered via AJAX to a jQuery UI Autocomplete input field. It's not a ...
0
votes
1answer
58 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
37 views

WP_Ajax Hook doesn't execute this PHP code

add_action('wp_ajax_nopriv_updating_heat_value','updating_heat_value'); add_action('wp_ajax_updating_heat_value','updating_heat_value'); ...
0
votes
0answers
81 views

Front-end ajax login form broken after WP4.0 upgrade

A site I manage has a a simple form a user can click on to login using ajax. It worked great until I upgraded to wordpress 4.0 Here is the relevant code: Function.php: function ...
0
votes
1answer
48 views

Calling a class method instantiated by ajax call in wordpress [closed]

I have an ajax call in Wordpress that instantiate a class. I want to be able to call the class methods in other functions. Here is the code to demonstrate. Ajax call: ...
0
votes
2answers
89 views

Why AJAX response 0!

It is irritating me why AJAX response is 0 !. I want to check whether the email address is valid or invalid on blur.Please suggest me here is my code This is my php code ...
0
votes
0answers
25 views

Drop-down list of article tags

How would I get a list of all the tags on a post-type archive page and display the tags not in a tag cloud but in a multi-select drop-down list. When the user selects tags, then filter which posts ...
0
votes
1answer
78 views

Using WP_Query to grab custom meta values, foreach to json object

So I have 4 custom meta boxes for each post on a wordpress site relating to the product this client sells. I have 3 dropdown boxes, one for category, and two for two of the custom meta boxes. The ...
0
votes
1answer
308 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 ...
2
votes
0answers
54 views

Is it possible to hook AJAX to UPDATE-button?

I have a site with a custom post. When I enter that custom post in admin (edit)-page then a form is rendered. This form takes like about 2-3s to render - it's a lot of of values in it - both hidden ...
0
votes
0answers
42 views

jQuery Ajax decompose WP_Query

I am working on a Ajax search field where I want to load links to products matching with my search query. My problem is that I don't know how I can get the titles and the permalinks from the query ...
0
votes
0answers
334 views

Load more button

I am trying to make a button that loads more posts with AJAX each time you click it. When I click the button the first time, it'll load 3 new posts, but if I click on it a 2nd or 3rd time it will show ...
0
votes
2answers
210 views

Filter custom post types by custom field using AJAX

I have a few custom post types (books, films etc) created with WP-Types. I then have a custom field called Genre, created with ACF. If a user selects "Books" from the dropdown on the frontpage, he ...
0
votes
1answer
17 views

Knowing blog name using blog id

I would like to get the blog name using the given blog_id, how would I do this? I tried to search for the codex but cannot find the right information
0
votes
0answers
65 views

How to execute function/method when specific URL is called?

I have url "www.something.com/wp-content/plugins/tool_new/admin/new_tool_email.php?method=new_tool_send" I want to sent up real cron job, and when this url is called to execute method ...
0
votes
1answer
69 views

Show Post Content with AJAX

I want to do a very basic AJAX call where, on click of a list item, a container div fills with associated content pulled from a Wordpress page. I'm a newb with AJAX; I've tried a few different routes ...
2
votes
2answers
159 views

Wordpress AJAX in header.php

I am currently studying Wordpress AJAX but keep getting error message (so the success function is not being executed) Currently I have changed the header.php (of twentythirteen theme) to include ...
0
votes
0answers
37 views

Getting data from database and use it to complete a form

I have the following files: Main plugin file: <?php /* Plugin Name: FixFormData Description: If you want to autocomplete a form with existing data, this plugin is for you. ...
0
votes
0answers
17 views

Determining the table that posts belong to in a multisite setting

I am currently running a multisite and I would like to display posts from other sites in a site. To do this, I wanted to use AJAX so that when I click on the post it does not get redirected to the ...
0
votes
2answers
56 views

wp_ajax handler with multiple class instances

Eight months ago I asked nearly the same question over there. But the Problem is still not solved so far. But I have an additional ideaa why it is failing. In the meantime my code advanced. I have ...
0
votes
0answers
36 views

ajax_wp is returning 0 for attempt of use in frontend

ajax_wp_nopriv_myaction is returning 0. I am trying to insert into a database by passing ajax data to a function. I know its using the javascript file, because it outputs an alert box of what the ...
0
votes
0answers
95 views

How to implement AJAX pagination for get_posts (CPT)?

I need to implement AJAX pagination: « Previous 1 2 3 ... 70 Last » for a CPT get_posts() loop: // main images query // all filters should be applied here $args = array( ...
0
votes
1answer
119 views

Accessing an API with jQuery and AJAX

As a proof of concept I'm trying to access an API using jQuery and AJAX and posting the results to a page. After following some online tutorials and doing my best to put it all together, I have the ...
0
votes
2answers
191 views

Filter second dropdown (tax) based on first dropdown (cpt)

I've been googling and attempting this for over a week now with no success. I have a few custom post types (books, films, music etc), and a custom taxonomy (location). On my frontpage, I have two ...
0
votes
1answer
139 views

admin-ajax.php (aborted) error when using jQuery.get

One thing that really confuse me is the following: When I load a javascript file via Ajax and I watch the http requests thats being made, then I see the following error in Firebug: admin-ajax.php ...
0
votes
1answer
11 views

Is it a good idea to init ajax functions only while 'DOING_AJAX'

I wonder if it is a good solution to add (a lot) ajax add_action() only if DOING_AJAXis defined. Normally my setup is something like this: add_action('init', 'my_ajax_init'); function ...
0
votes
0answers
37 views

Use proxy to bypass JSON restricion

I'm trying to pull content from an API that does not allow JSONP using jQuery and AJAX. Obvisouly I'm running into cross domain problems. The only work around for this seems to be using a proxy on my ...
1
vote
1answer
41 views

Restrict function call to page load but not ajax call

I use the following to stop Subscribers (and Customers) from accessing the admin area of my site: /** * Redirect back to homepage and not allow access to WP admin for Subscribers. */ function ...
0
votes
1answer
36 views

Adding instant search to wordpress page

I'm new to the site and to web development in general. I have a domain name, a hosting site, and wordpress installed. That took me most of a day. Now I'm trying to add this functionality to my site ...
0
votes
1answer
16 views

Using conditional staements to load plugins

I'm having some conflicts I think with a couple of plugins I have written that use ajax. As they load their resources on every page rather then just when needed I think it's causing problems. What's ...
0
votes
1answer
152 views

ajax call in wordpress front end

In my plugin i'm using two ajax calls in back end. that worked well. but to provide the same functionality in front end i loaded the copy of these two functions with another names and my code is: in ...
0
votes
0answers
19 views

Can You Require the Use of JavaScript in a WordPress Plugin?

I commonly use Mozilla Firefox for testing changes I make for a plugin that I'm developing. I also have the NoScript addon installed because it is also my main browser. I noticed that the ...
0
votes
2answers
37 views

Ajax not working for logged in users

I have this plugin "DWQA" in which the ajax calls work perfectly fine when the user is not logged into the site. But the moment user logs in to the site the ajax calls dont work. The variables that ...