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

5
votes
1answer
684 views

How to override WP_DEBUG for Ajax responses?

It is highly recommended practice (that I completely agree with) to develop with WP_DEBUG enabled. However it is merely inconvenient to see not yet fixed warnings in pages, but in Ajax responses they ...
1
vote
2answers
7k views

wp_ajax() question.. not using wp_enqueue_script?

hey guys, weird situation... I'm trying to use wp_ajax() for the first time. I'm normally using a normal jQuery ajax request but in my current case I get a lot of bugs so I thought about trying ...
1
vote
1answer
4k views

php ajax problem - weird 301 responses!

hey guys, I really really need your help. I have just no idea why that happens. I'm trying to load a wordpress page with the jquery $ajax method. However my browser is crashing all the time when I ...
1
vote
1answer
732 views

Calling a php file from a javascript file in wordpress

I have a simple pop up form code written in javascript. It is in js/script.js folder inside themes folder. I am using jquery ajax method to communicate with a php file to store data in db. The php ...
3
votes
2answers
568 views

Add a preview to a Wordpress Control Panel

I'm trying to create a new wordpress template and inside it I added a Control Panel, inside this control panel there is an option that allows user to choose where he want's to place a on a map, I try ...
-1
votes
2answers
211 views

Which function(s) to build a paged HTML table

are there built-in functions to build a modern HTML grid (as in grid control, not css grid layout) in WordPress? for example, one that is page-able and sortable.
4
votes
1answer
12k views

Upload post thumbnail from the front end

We would like users to be able to upload the post thumbnail when editing posts. How would this be done. I would imagine it would make use of the ajax functions of wordpress. Any ideas, Marvellous
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 ...
0
votes
2answers
3k views

trying to use wp_handle_upload with ajax

I've used this tutorial to build an option page form with Ajax. Now, i want to use the wp_handle_upload to upload an image. i tried this http://pastebin.com/35HW8RSZ but with no success. help will ...
1
vote
3answers
919 views

Ajax with OOP doesn't work

I have a small script within theme's functions.php file that uses ajax, principle like this: add_action('admin_head', 'rw_script'); function rw_script() { echo ' <script ...
3
votes
1answer
3k views

wp-admin - save options without refreshing?

I have my own plugin options page, but when users hit "Save" button the whole page refreshes. Is there a way of changing my script below to something that will for example popup yellow box saying ...
7
votes
1answer
3k views

How can I fetch loop of post titles via AJAX?

I have a list of the most recent post titles in sidebar.php. Here is an example of how that code looks: <?php $args = array('posts_per_page' => 20); ?> <?php $sidebar = new ...
35
votes
1answer
4k views

What's the preferred method of writing AJAX-enabled plugins?

I'm wondering what the preferred method is for dealing with AJAX calls. Should one use the same plugin php file to process the POST or a separate one? Which is cleaner or safer?
1
vote
1answer
1k views

How do you create an attachment ID with Ajax submit? No page refresh

I know I have done this before, with a frontend post form anyways that used Ajax to send the form data to a php script that used wp_insert_post() then redirected to that post after a success message ...
0
votes
1answer
174 views

best way to run a php script away from the template?

I'm looking for some inspiration on the best way to run a php script away from the template. I know that the wordpress core files won't have loaded, so I am wondering what workgflow you follow when ...
1
vote
1answer
337 views

How to create a wp admin page (for use in an ajax request)

How can I create a URL to an admin page (under /wp-admin/) that I'm not adding to the navigation? I want to use the URL for an ajax request.
1
vote
1answer
284 views

How to run JS, PHP and etc. inside WP post?

I would like to try little web apps with WordPress. Just to accept some values for few fields and present the output using AJAX. What are all the necessary modifications on WordPress? So, far ...
1
vote
1answer
2k views

Load created php file data via ajax

Ive been trying to do this for a long time here... First of all, im working with Buddypress latest ver. under WP latest ver. What i want to do, is i want to understand how to call content within a ...
0
votes
1answer
934 views

Ajax future single post query doesn't work when NOT logged in

I am having a problem with an ajax request for a single post, when the user is not logged in. The post is a calendar date and is in the future. the query works fine if I am logged into wordpress but ...
3
votes
1answer
5k views

jQuery Autocomplete in Wordpress

I'm using this autocomplete script https://github.com/agarzola/jQueryAutocompletePlugin within my wordpress theme. I have a form in a page where the user could specify some tags. Actually, this is the ...
0
votes
1answer
635 views

Ajax, Permalinks and post_thumbnail

As i'm new to AJAX, i'm still learning a lot and have learned a lot over the past weeks. I do need some more assistance on an AJAX issue though: I'm using the following code to display ...
0
votes
2answers
1k views

WordPress : using AJAX to get posts & Sidebar Content to an external application

Hello friends I am trying to get my wordpress posts to display in a non- wordpress application. Currently I am getting them by using the following method. My wordPress page is something like this: ...
1
vote
1answer
669 views

How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?

I've got two custom post types: CD and Track. Each of them has got some metadata associated with them. What I'm trying to do is to add Track posts to a CD post when the CD post is being edited. On ...
1
vote
2answers
384 views

__callStatic method handler passed to add_action causes bug in PHP <5.3

I have a class that handles AJAX requests for my plugin. The class has a __callStatic wrapper for all actions, which subsequently calls non-static methods for each action, like so: class ...
0
votes
1answer
6k views

Loading dynamic content with AJAX breaking jQuery

I'm creating a theme that uses only the homepage. When a button is clicked, the content for that section is loaded into a div on the homepage via AJAX (script below). $.ajaxSetup ({ cache: ...
1
vote
3answers
427 views

Wordpress: custom field display twice

I have a little bug on my WordPress... When I added a custom field, I have no ajax, I need to saved the draft or publish to see the update. And after I saved my post, the custom field display twice. ...
2
votes
2answers
2k views

Ajax loop refresh on click

I display a random post loop on a page. I'd like to put a "refresh" link to refresh the content of the loop via ajax. Is this possible? This is my loop if it helps: <ul ...
1
vote
3answers
856 views

Create unique page without header.php for json feed

I have two WordPress sites on separate domains. I need to expose the latest posts within a category via a json feed on one site that I have to use for the other site. I'll need to hit a "hidden" url, ...
2
votes
1answer
4k views

add_action('wp_ajax_[action name]', myfunction) problem

I'm trying to integrate ajax in wordpress using the wp codex guidelines. In the PHP I added: wp_enqueue_script ( 'my_ajax', ADMIN_URL . 'js/ajax.js','jquery','1.0.0' ); wp_localize_script( 'my_ajax', ...
2
votes
2answers
942 views

Getting $comments outside the comment template

I have a ajax request hooked on "template_redirect" (the ajax requests the post's url), and I want to display only the comment template: function get_comm(){ if(isset($_GET['get_my_comments'])): ...
4
votes
3answers
4k views

How to load and show comments with AJAX instead of pagination?

Is there a plugin that displays comments like this: http://img541.imageshack.us/img541/6541/47905634.jpg when the user clicks "read more", older comments are being appended to the list with ajax.
1
vote
1answer
2k views

Display custom post data in sidebar w/ dropdown

I'm trying to set up a sidebar area that'll do two things: Display a drop-down of posts in a given custom post types. Display post metadata (content and custom fields) if selected post The thing ...
3
votes
1answer
3k views

Can I load posts via Ajax?

I would like to make a portfolio page where each entry (a post) would be fetched using Ajax. This way I would have an image gallery, but in which I not only would have images but also the ...
0
votes
1answer
567 views

Get cat parameter from admin-ajax

I have a plugin that restricts the categories users can view/edit in the admin. All works fine in WordPress 3.0.1, but as I started testing 3.1 I noticed that the category filter, which is AJAX, ...
10
votes
1answer
4k views

How to manage ajax calls and JSON in wordpress

I have a custom post type that i want to access through jQuery - preferably using JSON. So first things first. creating a function that returns/echos json is easy enough, but how would I access it ...
0
votes
2answers
837 views

Ajax solution similar to WP Categories functioning in Admin area

I'd like to implement a similar functionality as WP Categories screen in the Admin area. Where you can add category and it will appear in the list of all categories straight away. I have a CD custom ...
2
votes
2answers
2k views

Custom Metabox with Ajax in Edit Post - Stuck

I'm trying to create a custom meta box with multiple text fields. The idea is that there is initially one text box, then you can click the button 'Add New' and a another text box is added (using Ajax; ...
0
votes
1answer
2k views

Admin-ajax.php appending a status code to ajax response

I'm writing a plugin that uses Ajax (jQuery with form plugin) via a form submission and the php function returns a JSON response. add_action( 'wp_ajax_bubbly-upload', 'bubbly_upload_submit' ); ...
3
votes
1answer
2k views

How to get Ajax into a theme - without writing a plugin?

Okay, I'm starting out with some AJAX stuff in a wordpress theme 1) I'm building a child theme OFF the thematic framework 2) My child theme has a header.php, index.php, functions.php and style.css ...
6
votes
5answers
2k views

How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?

I'm working on a site that requires an https secured admin area and a secure front-end area as well where private information will be shown. My preference for user login is an Ajax-enabled widget that ...
0
votes
1answer
356 views

jQuery forms & updating info

I'm attempting add some ajax to an existing script, all goes well for the first submit, but subsequent ones are not working as expected. add_action('wp_head', 'my_special_action_javascript'); ...