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
0answers
33 views

WordPress manually load TinyMCE scripts

How can I manually load the scripts that TinyMCE requires to run on the front end of the site? I'm pulling wp_editor through AJAX, so I know I'll need to run actions in order to get the proper scripts ...
3
votes
2answers
389 views

Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”

I'm using AngularJS's $http function to send my payload to WordPress's admin-ajax.php subsystem, but it seems the latter only accepts x-www-form-urlencoded data, instead of the application/json ...
0
votes
0answers
169 views

Unbind Form from Ajax Submit

I am working on a wordpress site that has the plugin contact7 installed. I have created my own form, and because of contact7, when I submit it, it is processed via ajax. How do I undo this so that it ...
1
vote
1answer
29 views

JSON - Permission Error?

I have two dropdowns to filter posts on a website. The second dropdown populates based on the selection of the first, ie: [CATEGORY] + [SUB-CATEGORY] = SEARCH The problem is that occasionally the ...
0
votes
0answers
44 views

Enqueue script in ajax shortcode call

I load a template part via ajax which contains a shortcode, which needs a javascript file to draw something. How do you enqueue it? Should I echo <script></script>? But what if it's ...
0
votes
1answer
161 views

AJAX Call in Plugin Returns More than JSON

I have a plugin tat extendeds Gravity Forms consisting of one PHP file and a JS file. The PHP file can be found here: http://pastebin.com/VUX5AfLP The JS File can be found here: ...
0
votes
0answers
105 views

How to force TinyMCE to update

I'm using the wp_editor function to display TinyMCE on the front end of my site. I have an AJAX script hooked up to the submit button on my form that shoots off to admin-ajax.php (as in WordPress ajax ...
0
votes
0answers
222 views

autocomplete automatically wordpress custom post dropdown attached to taxonomy term using Ajax and jQuery

Please, I want to create a wordpress-Ajax and jQuey driven form, that sends a bench of informations about a list of schools. That form will process data from custom post type" School" related to an ...
0
votes
0answers
31 views

wordpress use single ajax in place of multiple ajax requests in a smarter way

In wordpress I have database tables like this product name id product_name 1 A 2 B 3 C 4 D product_buying_price id product_name product_buying_price 1 A ...
1
vote
0answers
109 views

infinite-scroll for 2 fixed height containers

I have 2 fixed height columns for 2 different post-types. The goal is to get the infinite-scroll to work in both containers. I know that the JetPack infinite-scroll container parameter uses ID value ...
0
votes
0answers
66 views

Getting the current page post_id in function hooked to wp_ajax?

I have created a kind of a social network where when a user registration happens, I create a post (custom post type follower) for each user and assign its post_id to the user ( ...
0
votes
0answers
67 views

AJAX call keep sending message

I'm working on a form from front-end which inserts a post via AJAX. Everything works fine but when I opened chrome's console in the wordpress-admin menu and click on the specific post type it keeps ...
-1
votes
2answers
1k views

Dynamically populate Cascading Dropdown from MySQL using JQuery/AJAX [closed]

What I'd like to achieve is managing tables in the front-end of a WordPress page the same way as MS Access does. So, I'd like to show dependent cascading dropdown which are related by foreign key and ...
1
vote
1answer
1k 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 ...
2
votes
1answer
29 views

Get Plugin Information from Multiple Sites Externally

I'd like to create a dashboard of sorts of plugins I'm using on multiple sites. I'm able to use get_plugins() to gather the information I want within each site, but how can I make that data accessible ...
0
votes
1answer
35 views

Possibility of creating a folder in the wordpress root install and installing a file there, all via plugin?

Here is my situation. I'm creating a plugin, which uses a 3rd party API service. If I include the file ajaxAPI.php in the plugin itself, then call it via jQuery ajax with the full url, such as ...
0
votes
1answer
72 views

How to display checked posts on another page over AJAX? (like comparasion style)

I wanted to create an "comparasion" model for my WordPress Website, but gone bad at that. I cannot figure out how to ... On one page I have displayed post (custom post type, ex. "Products"). Next to ...
0
votes
1answer
25 views

Why is a old comment reply comment appearing at end of comment list as well

EDIT: Updated function to use get_comments offset param. Issue is still occurring. I am displaying 5 comments at the end of an article and using ajax to request the rest of the comments. On this ...
0
votes
1answer
67 views

Displaying contents of a tab

I have been trying to figure out how to accomplish what I need done which I can show here . I had asked this question in StackOverFlow which I got a good answer but I don't know how to implement it i ...
0
votes
0answers
146 views

Failed to Register WordPress Custom User Role via Ajax Submit Form

I edited my WordPress site custom registration page. I've added 2 new user roles: Employer Agent I renamed default WordPress Subscriber role to Job Seeker. And, this Job Seeker role has all the ...
0
votes
0answers
29 views

Security Plugin Blocks Access to theme folder?

I'm using some jquery to do an ajax request within my theme and it's spitting out a file 404 error even though the file exists. I"m guessing it has something to do with the security plugin. here's ...
1
vote
3answers
215 views

WordPress embeds in AJAX inserted content

I have a page that is calling in the content from other posts (a custom post type, specifically) and inserting it into the page. It all works great, but I'm losing the functionality of WordPress ...
0
votes
1answer
170 views

i'm trying to get all my media query attachments via ajax in wordpress

i'm trying to load all my media files via ajax: $.ajax({ url: '/wp-admin/admin-ajax.php', type: 'post', data: { 'action': 'query-attachments', 'post_id': 0, ...
0
votes
1answer
86 views

Using wpdb without loading all plug-ins via wp-load.php

I'm trying to prevent WP from loading all plug-ins when including wp-load.php, since I don't really need them nor the usual WP actions/filters. All I need is the WPDB class to query the database ...
0
votes
0answers
71 views

How to paginate custom query in functions.php?

I have a page with content filter. This filter do AJAX call to query in functions.php: function load_ajax() { $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( ...
0
votes
3answers
526 views

Single page site + pushState?

I have a single page site with posts that get loaded via Ajax on the same page via slide down div. When a post is 'activated,' I want that state to be set so that when I visit the url directly, it ...
0
votes
0answers
51 views

Are nonce really needed in frontent AJAX?

While doing some Wordpress development, I found that many frontend plugins, like contact forms, are using nonce values. Are they really needed? From security point they don't do much, as scraper can ...
0
votes
0answers
115 views

Display page/post content with Ajax - Shortcode Issue

Sorry for my english :) I am trying, for my new portfolio to load content post on home page with ajax. It's almost ok. I got issue with shortcode. I try many thing (iframe, but it not i'm looking ...
0
votes
0answers
17 views

Ajax asynchrous http request

I'm dealing with a form which is submitting custom posts.I want also the data to go in the google sheets.I've a function for that but i'm really struggling to get into wordpress plugin fileas as it ...
0
votes
0answers
29 views

How to use screen options with ajax pages?

How can I use screen options with backend ajax pages? Here is the code. I want to create pagination in AJAX pages. However $screen is null. $user = get_current_user_id(); $screen = ...
0
votes
1answer
589 views

How to get_template_part using AJAX?

I'm currently on the Woocommerce archive-product.php template file (say shop page or product category page). On the click of the post (or product), a GET query is added to the title of the same page, ...
0
votes
0answers
111 views

Ajax JSON response works for admin

I try to add custom post type object from front-end form with AJAX, right JSON response works only if i logged as admin, otherwise i get html code of main page, but object is added. js: var ...
0
votes
1answer
680 views

owl carousel not working after ajax load [duplicate]

i use jquery 1.11 and this code to ajax load wordpress post content in sidebar . everything is good but jquery functions of owl carousel not work and the carousel in post content not showing anything. ...
0
votes
1answer
513 views

Simplest ajax form not working when it should

I am trying to create a very basic ajax call in wp-admin area where the form sends the Post ID. This value will be used to update_post_meta(). Simply stuff right? Well, I've been on this task all ...
1
vote
1answer
96 views

Basic ajax call in WordPress

My aim is to create the most simple ajax call in WordPress, but I can't get my head around how it works. JS File: jQuery("#votepostform").submit(function() { var url = "file.php"; // php script ...
0
votes
2answers
525 views

Trying to get single posts to load on the front page via ajax

I posted a similar question about this before but I changed a bit of the code so I figured I'd start a new topic. Below is the setup I currently have to load single posts on the front page. This is ...
0
votes
1answer
159 views

WordPress dynamic AJAX query

Aim - I've trying to run a query based on which category is selected from the dropdown. I figure the best way to do this, is to dynamically use AJAX and pass the category value held by a variable to ...
0
votes
0answers
54 views

I'm doing this single page website the right way?

I'm making a single page web site using WordPress and I want to know if I'm in the right direction, and if this is the best way do it. First I'll show how the website is structured, it has 4 pages: ...
0
votes
0answers
99 views

get_comments() returns empty array if called through AJAX

I'm facing a quite strange issue with a simple get_comments() implementation in admin panel. Code is this (post ID is truly 1234) get_comments('post_id=1234&status=approve'); It returns proper ...
1
vote
0answers
133 views

Ajax form submission from admin panel

I have created a page in admin panel and there I have created a form for CSV export/import . Action of my form is "/wp-admin/admin-post.php" . I want to submit that form via ajax . I want to remain on ...
0
votes
0answers
29 views

Enhance built-in calendar widget to dynamically browse through months

I am using the built-in calendar widget to show posts, the plugin "Future" helps me to show future posts too and so far everything works fine. But when you click on the arrows for the previous or ...
0
votes
1answer
190 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(); } ...
0
votes
0answers
83 views

Calling an external file using ajax

I'm trying to create a Medium-Like editor on Wordpress. I'm using this https://github.com/orthes/medium-editor-insert-plugin I've corrected the code about embedding images, but I still have problems ...
0
votes
1answer
56 views

Distinguish between 2 instances of admin-ajax.php

I've added an avatar image selector to my profile.php page. I'd like to be able to alter the query that loads the image library using pre_get_posts but I can't find any way to distinguish between ...
0
votes
1answer
2k views

Loading posts via AJAX in a hidden div with updated URL?

I'm using the code below to asynchronously load posts on the same index page via AJAX. I would like to be able to update the URL as well but am unsure how I can go about adding that to what I ...
0
votes
1answer
41 views

Loads posts of different year via AJAX call

I need some advice with this one. I want to load posts of certain years depending what year the user clicks, to achieve this I have the following: <?php $args = array( 'post_type' ...
0
votes
1answer
29 views

Wordpress version for this autocomplete jQuery code

The following code works well but does not work in wordpress please assist: $(document).ready(function () { var ac_config = { source: "ajax.php", select: function (event, ui) { ...
0
votes
0answers
48 views

Custom searchfield autocomplete

I have tried to fire an autocomplete on a customized search field but to no avail. I have used some codes from help sites but I really do not know what I am doing wrong. Nothing happens when I type a ...
0
votes
1answer
55 views

Using AJAX for dynamic settings pages

I have a settings page like ... add_options_page ( 'XXX', 'XXX', 'manage_options', 'xxx_plugin', 'xxx_options_page' ); function xxx_options_page() { ?> <div class="wrap"> ...
1
vote
1answer
76 views

Is it safe to use $_POST directly in my plugin instead of using admin-ajax.php to receive data from ajax?

When we want post data from frontend to WORDPRESS everyone says i must use admin-ajax.php. But i can add query vars and receive posted data in my plugin file using a global variable, and then i can do ...