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

1
vote
2answers
328 views

Get post and all posts after it by ID?

Maybe this is super obvious and staring me in the face, but I'm stumped. Is there a way to pull and sort posts by ID? I'd like to grab an arbitrary post, and then x number of posts after it. ...
0
votes
1answer
426 views

Custom post type's extra fields - how to handle?

I've refrained from asking this question for a couple weeks, as I wasn't completely certain what I wanted cleared up... think I got it. I'm in the process of putting together a plugin to run a ...
0
votes
2answers
494 views

WordPress plugin admin page - using WordPress function in linked php file

Asked this question on StackOverflow and they directed me over yonder... nice place ya got here =) I've been developing a pretty simple WordPress plugin, and wanted to do some live validation of ...
2
votes
3answers
432 views

wp_localize_script $handle

Can anyone tell me what the "$handle" ( first parameter ) of wp_localize_script is normally used for. Thanks. P.s.: I have no idea why but stackexchange is telling me this question dosen't meet ...
5
votes
1answer
199 views

Help making my pagination plugin better

I'm not sure if this is the right place to ask for this kind of help since is not an actual question but hopefully I can learn a thing or two. I'm developing a plugin (my first one) inspired in the ...
0
votes
1answer
1k views

Automate post update for all posts?

I have managed to fill custom fields with certain predefined values of all my post, but the changes don't take effect until I manually update the posts. Example: // Predefined variable and value ...
1
vote
1answer
512 views

ajax in wordpress - path issue

am trying out a bit of ajax ( via jquery ) in wordpresss. ... i have everything working correctly but for some reason i have to have the full url to the php handler file even though it's located in ...
4
votes
1answer
904 views

Multiple ajax nonce requests

I have a feature in my current project that will be allow multiple ajax requests - I've got a single nonce request worked out (via this tute), but am somewhat unsure how to figure in multiple nonce ...
0
votes
1answer
177 views

Which hook to use when adding ajax to viewer-facing side?

I have a shortcode that contains a form. I want to use jQuery/Ajax for POSTing. For this, I want to add javascript to the page where shortcode is added? Which hook should I use? wp_enqueue_scripts ...
2
votes
2answers
1k views

How do I use Ajax to show the new posts realtime, on the frontpage

Does anyone know how to make new posts automatically show up in the frontpage, with out having to refresh the page. I have a wordpress site with multiple authors and want their new posts to show up ...
1
vote
1answer
462 views

get post attachment using ajax

I'm developing a plugin and I'm trying to get the url's from a post's attachments with ajax. If the user is on a single.php page. After some seconds, I'm sending an Ajax request, getting all the ...
0
votes
1answer
1k views

my example with ajax doesn't work

i'm trying to use ajax with a simple example, i took the example from : http://ocaoimh.ie/2008/11/01/make-your-wordpress-plugin-talk-ajax/ example N°5 (which doesn't work actually as it is) So i'm ...
3
votes
1answer
432 views

Build path for a custom portfolio plugin

I'm finishing up a personal site that I've spent many weekends on. I've left one of the (potentially) most complicated parts to the end of production. I'm looking for some advice on how to proceed ...
1
vote
2answers
866 views

problem with ajax and the path to the php page

i would like to call a php page from an Ajax method : the alert works fine, the code as well has been tested outside of wordpress, but here it seems that the php page is never called. I found some ...
1
vote
2answers
2k views

wp_mail script with jquery post

need to send an email from a page when a form is submitted. Thought i'd use jquery post but not really sure where to start. Would i use wp_mail? And if so how could it be called ? Sorry if that ...
1
vote
1answer
1k views

Can't use get_results() in ajax query

I'm using a jquery ajax call to get certain data from wpdb and I'm getting the following message: <b>Fatal error</b>: Call to a member function get_results() on a non-object in ...
0
votes
1answer
644 views

How can I use AJAX to save/update a widget form?

My custom widget's form will have two pull-down menus: the content of the second menu is dependent on the user's selection in the first menu (think of the way Country and State/Province works). I ...
1
vote
1answer
66 views

Does an AJAX call on the Admin Side Automatically include the User Data/Capabilities?

I was wondering that if you do an AJAX call on an admin page and I wanted to see if the user had the capability to edit a page, would that info be sent along the call or do I need to manually sent ...
1
vote
1answer
672 views

AJAX Contact Form Issue

I created a contact form for my sidebar that is working perfectly in Chrome but not in IE or FF. I've been staring at it for hours and can't find out what I did wrong. I'm not getting any errors ...
3
votes
3answers
7k views

Load entire NextGEN gallery from single thumbnail?

I'm using Alex Rabe's NextGEN Gallery in a lot of client sites as a centralized image repository, and am finding I often need to load an entire gallery into a lightbox (invoked via a single ...
3
votes
2answers
608 views

Why can't I hook into save_posts after admin_init?

I'm trying to hook into the "save_post" action from an AJAX callback in my plugin, but it doesn't seem to work. In fact, hooking into "save_posts" only seems to work from a few key action execution ...
3
votes
1answer
4k views

How to make ajax call in wordpress in right way?

I am trying to using jquery ui tabs with ajax calls to run a function. Here is the code i am using: function ajax_load_user_feed(){ if(isset($_GET['type'])) $type = $_GET['type']; ...
1
vote
1answer
183 views

Dashboard - get status and position of metaboxes and pass them to ajax method

I'm wondering if it's possible to get status and position of metaboxes added to a dashboard-like page. The main page of my plugin has several metaboxes laying in a two-columns page and a "table of ...
4
votes
1answer
3k views

How To create ajaxed wp-pagenavi?

I'm using WordPress as a Facebook platform and have a page that shows posts from 2 different categories. Each category has it's own pagination using wp-pagenavi. In order to stay in Facebook I need ...
6
votes
3answers
766 views

WordPress Ajax Data Security

I am aware of nonces to check for intentions but can't make any sense if I can use them to restrict for database reads somehow? I mean, I am fetching records from the database using AJAX but I don't ...
2
votes
2answers
2k views

Can't access WordPress functions in file called via Ajax?

I am trying to reload the fresh posts using jQuery. As far as I know, I can't reload the contents of a div inside the page so I reload a file into that div. The problem is that my loaded file gives ...
7
votes
2answers
3k views

Open a Thickbox with content trough AJAX

I added a custom button to the TinyMCE editor, and I want to open WP's Thickbox when I click on it. How can I make it so that the tb_show() function loads the content I want with ajax? // the ajax ...
3
votes
1answer
981 views

ajax - why multiple calls to wp_create_nonce() return same value?

I've some trouble getting nonces working with my ajax submit form. First of all i create a nonce and pass it to my registered script, i'll later send it to ajax-handler packed with my form fields: ...
2
votes
2answers
1k views

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

I'm having the exact same problem described in this post: add_action('wp_ajax_[action name]', myfunction) problem I set add_action('wp_ajax_my_function_call','my_ajax_function'). If I ...
7
votes
2answers
2k views

post formats - how to switch meta boxes when changing format?

Problem After realizing that post formats are pretty popular, but only a extremly rough drawn concept, i see that users will run into possible traps. Post format ... uses post meta fields & ...
3
votes
1answer
560 views

How to enable users to down-vote in this simple voting counter (that uses the post meta)?

This simple tutorial teaches you how to make a voting counter using the post's meta data. I would like to know how to add down-votes to this small script (e.g. -1, -2). In the following way: If the ...
0
votes
2answers
1k views

Redirect to another page using contact form 7?

I'm using CF7 to send some information to my email and everything's working fine, but I need to redirect the users to a different page after the email has been sent, by default the forms are sent to ...
1
vote
1answer
5k views

How to create a load more post entries like Twitter?

Hey guys, last days i have been trying to figure out how to do that. As read on http://net.tutsplus.com/tutorials/javascript-ajax/create-a-twitter-like-load-more-widget/ but inside wordpress. And i ...
4
votes
1answer
437 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
5k 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
2k 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 ...
0
votes
1answer
330 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
516 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
204 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
6k 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
2answers
3k 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
2k 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
511 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
2k 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 ...
6
votes
1answer
2k 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 ...
30
votes
1answer
2k 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
838 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
173 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
330 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 ...