0
votes
1answer
25 views

Filtering posts by multiple taxonomies

I have a page on which I want to display all posts of a specific custom post type, let's call it "persons". I want to allow the user to filter all persons by multiple (!) taxonomies: age, city, ...
0
votes
0answers
28 views

Ajax category pagination problem

I want to make a pagination or load more button for my ajax category display. Here is my attempt, I have no idea how it can work out. Any ideas? add_action( 'wp_ajax_nopriv_load-filter', ...
2
votes
0answers
73 views

Chopping up a large ajax request of around 200 posts [closed]

I've put myself into an uneasy situation, where I have roughly 200 posts I need to load in with jQuery .load(). Nothing shows up until the whole .load() has executed, of course. Takes roughly 3 to 4 ...
0
votes
0answers
28 views

Infinite scroll wont work on mobile browsers. Works on non mobile systems

I implemented infinite scroll on my WordPress blog using the following script: <script type="text/javascript"> var abc=66;//what is abc doing? $(window).scroll(function () { ...
0
votes
0answers
50 views

Sorting Posts Based On Meta Value Using AJAX

I am trying to short posts on frontpage/archive pages using AJAX. The AJAX call seems okay but nothing displaying. Here is the JS: jQuery( document ).ready(function() { jQuery( ".sbyp" ...
0
votes
1answer
71 views

setup_postdata in “loop-handling” php file called via $.ajax

I'm calling a "loop handler" kind of php file that opens a loop with WP_Query. Inside the foreach loop I want to use the show_postdata function. I'm aware of the global $post aspect of this function. ...
0
votes
1answer
51 views

Fetching posts from wordpress function in ajax

I'm trying to fetch posts in ajax. Everything is working but It is showing only one post. Please check my code and tell me if something is wrong function ag_get_posts() { global $post; $args ...
-1
votes
3answers
74 views

AJAX in wordpress theme loop

I'm trying to make a AJAX request on my theme. I already know wordpress handle AJAX very well, but not directly on theme file. It uses admin-ajax.php for this. I working on this for a long time and ...
0
votes
0answers
24 views

Check for new posts in the loop every x mins/seconds

I'm trying to think of a way to check for new posts in the current loop (e.g. author, or tag) using ajax to give a live blog feel without reloading the whole page. Is it possible to 'fire' the loop ...
0
votes
1answer
62 views

Retrieve WordPress' the_content() with jQuery

I'm trying to load some additional images when the user clicks a button. At the moment, I have the following function: $('a').click(function(){ $( ".gallery-pop-up-container" ) .load( ...
1
vote
0answers
191 views

Shortcode in posts called by ajax is not working

I am using ajax to load content of post. Functions like the_title() works fine, but unfortunately the_content() doesn't returns any shordcodes( gallery nor tablepress ) data. here is my code: ...
0
votes
1answer
101 views

How to render the single post template with the post name?

I'm calling pages with Ajax and I have this code in functions.php to determine which page is called and then, render the corresponding template: function ajax_callback() { if( isset( ...
0
votes
3answers
114 views

Get post offset/posts page offset in single post page (outside the loop)

I would like to know how I could get the offset of a custom post or its page, outside the get_posts loop. I developed an external web application which connects to the wordpress blog with JSON API ...
0
votes
0answers
2k views

AJAX with loop filtering categories

I've been researching on how to make my loop with AJAX. I found some codes online and modified some parts but I can't seem to get it to work. This is my code for the loop: <article id="main" ...
1
vote
1answer
483 views

Ajax loop in sidebar to load post titles/categories

I have a sidebar that displays the 20 latest posts, what I'd really like to do is Ajaxify that loop so there's a load more button at the bottom. The problem is, it's a fairly complicated loop and ...
-6
votes
3answers
398 views

Jquery Slider for profile template

I want to show the posts under a category in my page.The first 5 posts should be shown when the page loads and When the user clicks the next button/link next 5 posts should be shown. Currently I show ...
1
vote
1answer
2k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
2
votes
2answers
725 views

The correct way to call posts with ajax

I'm trying to write an image gallery plugin with jQuery. I'm using jQuerys $.post AJAX method to send and receive info from the relevant post page. Basically I'll be looping through the attachments ...
1
vote
2answers
508 views

Load comments per post on click with AJAX

I'm working on a theme that uses a slider to display blog posts. Beneath the slider is a pagination that displays like a timeline, with a date instead of a page number, calling the corresponding blog ...
0
votes
1answer
55 views

Load featured article once in a loop

I'm working on a WP-Touch theme and I have a template file that looks like this: <?php get_header(); ?> <?php locate_template( 'featured-post.php', true, false ); ?> <?php ...
0
votes
1answer
175 views

Using jQuery .after inside loop

I have a bit of javascript that will dynamically add a static post to a loop. The script uses the jQuery 'after' method and on a static page it works beautifully but when inside the loop I don't get ...
0
votes
1answer
258 views

Getting selection of posts based on loop variables via Ajax

For a theme I'm building I'm looking to dynamically load in a selection of posts with Ajax depending on if a user selects a category or a year ('show all posts in 2012'). I've seen many different ...
2
votes
2answers
436 views

How WordPress converts URL to $query_string

My home.php shows a list of (N) posts and << Previous & Next >> links. When clicked, I want to fetch previous/next list of (N) posts using Ajax. This is: I do NOT want to load the entire ...
0
votes
1answer
674 views

how to json_encode(); the Loop content so that the encoded array is [“0”:content, “1”:content]

<?php $dVC=array(); query_posts('meta_key=featuredt&posts_per_page=5'); if (have_posts()) : while (have_posts()) : the_post(); $dVC []= $post->post_content;?> <div ...
1
vote
1answer
395 views

How to pass the current content of $wp_query to a new page?

I am developing a Wordpress theme that uses a lot of AJAX. It is composed of two main pages: the index, which displays a list of posts, and a viewer (similar to single.php). When a post is clicked in ...
0
votes
1answer
319 views

Ajax request with jQuery without WP_ajax

I try to made a website in full ajax (a html5 website). I use jquery and innerShiv (for ie). For exemple I want to load all the content of the "section" tag of a page. When I use that script, it ...
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 ...
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 ...