Search 
Search Forums:


 




I need AJAX pagination on the index

Reply to Post
UserPost

8:26 am
June 11, 2008


chaz

Guest

Hi thanks for this plugin. I would like to have pagination on the front page of wordpress.

one thing i hate about wordpress is the length of scrolling u do on the front page

Is there a plugin to have pagination on the front page??

eg, if i set 5 per page then WP lists the 5 and have pagination to the other articles

12:56 pm
June 11, 2008


Aaron

Admin

posts 245

You can “fake” it by using conditional statements to “count” the number of posts that have already been displayed and then after that paginate the remainder.

The basic technique would be to disable AWP inside the loop for the posts that your don’t want to see.

Set up paginated posts like normal and then add some quick code to your index.php file.

At the beginning of the loop:
<?php $post_count++; if($post_count <= 5){do_action('awp_no');}?>

At the end of the loop:
<?php do_action('awp_yes');?>

Reply to Post


Reply to Topic: I need AJAX pagination on the index

Name (Required):

EMail (Required):

Website):

Guest URL (required)

Math Required!
What is the sum of: 3 + 12        (Required)

Topic Reply:


 

About the Anthology of Ideas forum

Currently Online:

3 Guests

Maximum Online: 33

Forums:

Groups: 2

Forums: 6

Topics: 212

Posts: 671

Members:

There are 1 members

There are 199 guests

Aaron has made 245 posts

Top Posters:

Administrator: Aaron