I have a
index,php with various
new WP_Query all working ok, but in this block I need to implement that "AJAX thing people love - the load more posts":
<h2>Latests articles <?php bp_site_name(); ?></h2> <?php $destaque = get_term_by('slug', 'destaque', 'post_tag'); $video = get_term_by('slug', 'video', 'post_tag'); $nd_query = new WP_Query (array('tag__not_in' => array($destaque->term_id, $video->term_id), 'posts_per_page' => 5, 'paged' =>$paged)); while ($nd_query->have_posts()) : $nd_query->the_post(); ?> <span class="box-excerpt" id="post-<?php the_ID(); ?>"> <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h3> </span> <?php endwhile; ?>
Tought this was simple but I can't even figure out how to set a pagination in this block. If there's anything than AJAX let me know.
NOte! I'm modifying an BuddyPress theme, that came with some AJAX, maybe is there smeway to re-use things.