Plugin Directory

Ajax Pagination (twitter Style)

This plugin convert WordPress default pagination behavior into the Twitter style using Ajax functionality.

How can I get Ajax pagination button

Place the following code after the main loop of the template.

<?php if(function_exists('genarate_ajax_pagination')) genarate_ajax_pagination('Read More', 'blue');  ?>

How can I change Button styles

Third parameter is used to change button styles. This Button is available following colors

  • black (default: no need to set third parameter)
  • blue
  • red
  • magenta
  • orange
  • yellow

How can I use pagination in the custom post type template

If you have a specific template using custom post type, you have to assign the custom query array into the $query parameter. eg:

  1. Here custom post type is 'magazine'
  2. Theme uses loop-magazine.php to load the posts content.
  3. Now we should add following variables to the genarate_ajax_pagination() function.
$btn_name   = 'Read More'
    $color_name = 'blue'
    $loop       = 'loop-magazine'
    $query      =  array('post_type' => 'magazine')

    <?php
       $projectspost = new WP_Query(array('post_type' => 'magazine'));
       //number of post for a page
       while ($projectspost->have_posts()) : $projectspost->the_post();
         get_template_part( 'loop', 'magazine' );
       endwhile;
    ?>
    <?php wp_reset_query();   //Restore global post data stomped by the_post(). ?>
    <?php 
        if(function_exists('genarate_ajax_pagination')) 
        genarate_ajax_pagination('Read More', 'blue', 'loop-magazine', array('post_type' => 'magazine')); 
    ?>

See more: http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html

Have you got any questions?

Oh! that's good, Please email to me nuwan28 at gmail.com

or

Create a new issue Ajax Pagination (twitter Style) - issues

Requires: 3.0.0 or higher
Compatible up to: 3.3.2
Last Updated: 2012-1-17
Downloads: 4,548

Average Rating

2 stars
(9 ratings)

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

50,4,2
0,1,0
0,1,0
0,1,0
0,2,0
0,3,0
40,5,2