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 ...
1
vote
1answer
23 views
Registering AJAX callback function that is part of a class without instantiating the class in function.php
I'm not even sure if this is possible. But nevertheless I thought of asking. I'm in habit of wrapping/grouping AJAX calls for a particular need within a class. See below.
class my_class {
...
0
votes
1answer
18 views
POST from jQuery to PHP
I have a form that passes field values to jQuery, which validates the fields and creates the variables being sent in data: {} in the snippet below.
$.ajax({
type: "POST",
url: "<?php ...
0
votes
0answers
15 views
Lightbox Post Pop-up on homepage [duplicate]
I've been working on sampression lite theme and what I want to achieve is when a post' thumbnail/read more link on homepage is clicked, a modal will pop-up ( similar to pinterest and this wp theme ...
0
votes
0answers
9 views
How to utilize theme customizer live preview in this situation?
Short version: I am using the theme customizer in my theme and javascript for the live preview. I am not sure how to implement the javascript for php(as seen in code excerpt).
I am creating a theme ...
0
votes
0answers
19 views
How to disable controls in theme customizer?
Edit: I have rewritten the question in hopes I will get a reply from someone who knows the theme customizer.
I am trying to figure out how to disable setting controls in the Wordpress theme ...
2
votes
2answers
543 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 ...
2
votes
1answer
112 views
Buddypress ajax problem after adding new groups sub nav
This problem has been bugging me for couple of days. After adding a new subnav, I got the following error when trying to use the drop down groups filter:
404 Not Found – ...
0
votes
0answers
24 views
Loop not appending through infinite-scroll ajax call
I'm having trouble debugging why the InfiniteScroll jQeury plugin isn't loading more of my .boxy class items. So far I've placed the div containing the selectors in different levels of heirarchy, but ...
0
votes
1answer
14 views
How to load wordpress sidebar using AJAX [duplicate]
I am using responsive design on my website. Everything is fine except for the fact that on a mobile phone, my website is just too long. There is just too much content for a mobile screen - too much ...
7
votes
2answers
450 views
How to make comments work for a post loaded per Ajax?
I am currently loading a single post using ajax. While the post loading works ok, I cannot get the comments to load. Here is my code:
My javascript to load the post:
<script>
...
0
votes
1answer
221 views
Ajax URLs without #!, how to prevent falling into single.php on load or reload?
I'm trying to make things properly with a single page ajax powered portfolio. I've read that there is no need of #! to make it crawlable by google. So I have clean URLs that updates with .pushState ...
0
votes
1answer
26 views
Not getting an ajax readystatechange on my page
I've been trying to get a stand alone web page I use rebuilt as something that can be accessed as a page in my blog. Following advice I've created a new template for this page and do all my work ...
0
votes
1answer
672 views
Register Template
I created a register template for Wordpress with some ajax so that users can click on the register link in my header and the register form opens up in a lightbox. For some reason on submit, if there ...
1
vote
0answers
36 views
Ajax : Call undefined function plugin_function() … can't call any plugin function
I use a Ajax query to show some content, but I can't use any of my plugins functions.
Javascript :
$('#load_more').click(function() {
var data = {
action: 'load_more',
id: ...
1
vote
1answer
27 views
Load ajax if is_home()
I want to show some simple things on homepage with ajax. The problem is I want to load everything when is_home() is true. Php, js, everything.
In funtions.php:
add_action('init', ...
0
votes
1answer
131 views
How to add Ajax to the default widget calendar to support next/previous months loading?
I want to customize or replace the default calendar, similar to the default widget, but with Ajax next and previous months loading.
Ideally I would like to be able to do that (red dots are dates ...
0
votes
1answer
43 views
Three level taxonomy dropdown frontend
I have a code in my functions.php to display 3-level taxonomy dropdown:
$brand_taxonomy = 'county';
$taxonomy_name = 'Vietovės pasirinkimas';
...
-1
votes
1answer
152 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 ...
0
votes
0answers
18 views
videopress videos are not displayed when loading the content with ajax in a lightbox
I'm using videopress and I'm adding the videos into posts with the videopress shortcode, and when I visit the post I can see the videos and play them, but the problem is when loading the post with ...
0
votes
1answer
185 views
Load more posts with multiple queries
I've been developing a theme which uses the load more ajax plugin, everything is setup and working great with the main query.
But, once I setup a new query for popular posts, the load more posts ...
0
votes
1answer
21 views
AJAX pagination call to get_posts with an offset and a meta_value_num sort returns same post on adjacent pages
I have a simple AJAX pagination that seemed to work just fine, calling one Wordpress page (not ideal, I know) with a pagenum and a sort order arguments and it returned 4 custom posts per call. The ...
3
votes
1answer
207 views
External/non-WP rewrite rules
I have a fairly complex wordpress with multiple sub-directories:
example.com/sub1/
example.com/sub2/
I'm trying to implement some history/bookmark support, and to do that I need the URLS containing ...
-1
votes
0answers
29 views
Ajax tabs not animating content
I am having some trouble with jquery ajax in Wordpress. I want Ajax to load content from other pages in a div called "place-content". They are loading but it jumps to the top of the page every time a ...
0
votes
2answers
2k views
Load Next WordPress Posts With AJAX?
I found an amazing plugin that loads the next posts with Ajax.
http://www.problogdesign.com/wordpress/load-next-wordpress-posts-with-ajax
However it doesn't work with custom post types.
The code ...
0
votes
2answers
50 views
Pull GetOption() variable into jQuery dynamically created html
I have a page with the following markup in the site theme footer:
<div id="modalpopup"><div id="inside"></div></div>
I have a variable in the WP db I can retrieve via ...
1
vote
1answer
93 views
How to add default images into theme customizer image control?
I am trying to figure out how I can pre-load a theme customizer image control with images I have selected. Is their a way to point the control to a directory so they automatically show up in the ...
0
votes
1answer
312 views
Converting a working AJAX form to work with Wordpress
I have a working html form with jQuery validation and have been submitting the data with AJAX, I am now trying to copy this form in to my own Wordpress theme, but I can't see where I am going wrong in ...
1
vote
2answers
2k views
How to load wp_editor() through AJAX/jQuery
I have a theme that is custom developed and really complex. One of the things that I have is multiple content areas where users can specify content for specific tabs. I load multiple instances of ...
0
votes
1answer
173 views
slideshow is not showing in a post call with ajax
this is the code I use to call ajax posts in the same page.
It's works fine but when the post is load the slideshow in the post (add via short code) is not showing....
the ajax call
...
0
votes
1answer
53 views
Change Post Meta via AJAX from the posts list table
I've been looking around for this for a while but haven't found anything as of yet.
I have a custom post type - "books" and this post type has a custom meta field of "availability".
I would like to ...
0
votes
1answer
407 views
Get selected value with PHP and jQuery
I have form that i'm using to update user profile from front end and i have country select.
<form method="post" id="adduser" action="<?php the_permalink(); ?>">
<select id="te" ...
0
votes
0answers
48 views
update_user_meta doesn't work with AJAX
I try to keep user subscription in a metadata var.
The function is called by AJAX. Ahe AJAX is called but the metadata does not seem updated on frontend.
Here is the code:
jQuery
<script ...
0
votes
1answer
138 views
Adding inside wp-plugin jQuery script that receives JSON-formatted data, generated by php-function inside this plugin
I'm trying to add Highstock chart in my plugin. It requires input data in json format. But I have some troubles with default json parser in jQuery. I've already read this article, but still can't ...
0
votes
1answer
43 views
Why is ajax working on one server and not the next?
I have some script that works on my dev server but not on my staging server:
add_action('wp_head','get_gz_info',30);
function get_gz_info(){
?>
<script ...
1
vote
1answer
577 views
Intergrating agile carousel to wordpress: how to write the ajax_callback function
json is totally new to me how to write an ajax_callback function for agile carousel to work in wordpress? Below is the jason data format that I need to write as php arrays for it could be parsed by ...
0
votes
0answers
11 views
How to add a new custom field by AJAX?
Just like AJAX_in_Plugins and previous question update-custom-field-meta-value:
jQuery.post(ajaxurl, data, function(response) {
// update the custom field value without reload ??
});
I make ...
1
vote
1answer
311 views
“Loadmore” button is not working in buddypress
"Load-more" button in the activity stream page in buddypress is not working for me. If clicked means , it disappearing suddenly but no more posts are loaded.
<?php if ( bp_get_activity_count() == ...
2
votes
2answers
69 views
Admin Ajax is returning 0
I am relatively new to jQuery and AJAX in particular. I have a small issue with the return value always being 0, though I think this is actually the success message and it's not returning anything.
I ...
0
votes
1answer
115 views
Ajax Validation for reCaptcha
Background
I have a registration form that validates with AJAX using jQuery Validation Engine. The form was created using Theme My Login and contains reCaptcha which I implemented using WP-reCAPTCHA.
...
1
vote
1answer
129 views
WP_Query orderby breaks when using AJAX?
I'm running in to a bit of a problem.
I have a function called get_press(), it retrieves newest press items. It is inside of a plugin:
class EWPress {
function __construct()
{
...
-1
votes
0answers
65 views
woocommerce - load product with ajax
Is there a way to properly load product single page with ajax?
I have created "ajax-product.php" which looks like this:
<?php if( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
...
0
votes
2answers
56 views
Ajax requests from front-end with jQuery Fancybox
I would like to be able to use the jQuery Fancybox's Ajax feature to request datas from the front-end.
Here is a part of the code i'm using on the plugin part :
wp_localize_script( 'wpPluginjs', ...
0
votes
0answers
24 views
Problem with function not executing
I am sorry for the long post but I wanted to be thourough in hopes someone could help me figure out this issue. I have been trying to get it working for 2 days with no such luck. I would appreciate ...
8
votes
1answer
216 views
Does the functions.php file ever get called during an AJAX call? Debug AJAX
Trying to figure out an issue a fellow programmer is having. I was wondering if the functions.php file get called at all when you do admin side AJAX? I know that when you do an AJAX call a part of ...
0
votes
0answers
25 views
AJAX post method for searching posts error
The following errors occur when you try to load an URL with [] in it (as far as I know). I don't know why I am getting this errors, how can I correct the code below?
Errors: Warning: strpos() ...
2
votes
1answer
184 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() {
...
1
vote
2answers
520 views
How to get gallery id inserted to a post?
Is it possible to get a specific Gallery ID inserted to a post in wordpress 3.5? I want to load gallery from post using Ajax. I use shortcode [gallery] to do it. But when I use it this way:
echo ...
0
votes
1answer
43 views
Why can wordpress not find the actions I add in my constructor?
I have a theme which has a page to display a keyword taxonomy called taxonomy-keyword.php. From this page I instantiate a sort of ViewModel called KeywordPage. It looks like this:
namespace ...
1
vote
1answer
264 views
AJAX search as you type?
I'm trying to implement a kind of "search as you type" feature with the Search bar. Essentially, I'd like to have the user begin to type, make some kind of ajax request after each key, and then ...
9
votes
1answer
239 views
Using jQuery to delete data stored in wp_options
I wonder if anyone could advise me further on my problem. Part of my plugin stores log files for debugging purposes. I have successfully displayed them in a (div#log) in my admin page using jquery ...

