Load posts into sidebar and paginate via ajax?

You need to wrap the nonce with quotes and instead of the_permalink() and the_title() use get_permalink() and get_the_title() so like this: <?php $args = array(‘posts_per_page’ => 1); $sidebar = new WP_Query($args); if ( $sidebar->have_posts() ) : while ( $sidebar->have_posts() ) : $sidebar->the_post(); ?> <div class=”story”> <a href=”https://wordpress.stackexchange.com/questions/76921/<?php the_permalink(); ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a> </div> … Read more

Ajax pagination works only first and third time

@kennypu in stackoverflow saved my life with this: t’s because you’re changing the contents of #paginar, so what happens is the event on the links are getting cleared. depending on your jquery version, you can either use .live() or add the even to the #pagi-container instead: $(‘#pagi-container’).on(‘click’,’#paginar > a’,function() {… } my finished code is … Read more

Paginated Taxonomy Term Archive including one post per term

As discussed in chat and as @Rarst already told you, there’s no default WordPress way to accomplish Archive of multiple taxonomies and all their terms In fact there’s no way to accomplish Archive of single taxonomy and all its terms in WordPress. Simply because WordPress doesn’t do that – without custom SQL queries. But there’re … Read more