How to Display recent Posts in WordPress blog home page only when a link is clicked

Need to do the following process when a particular tab is clicked in wordpress in blog home page

Need to display using ajax

Read More

For example,

There are three tabs saying They like , Recent ,Popular , All in blog home page

1)When “They like” tab is clicked -> In the blog home page, need to display the latest 16 posts from the blog members they like.

2)When “Recent” tab is clicked, need to perform the following tasks
In the content area, need to display the latest 16 posts from the authors.

3)When “Popular” tab is clicked, need to perform the following tasks
In the content area, need to display the popular 16 posts from the authors.

4)When “All” tab is clicked
need to display all the post from the blog with pagination underneath the content area.

Related posts

Leave a Reply

1 comment

  1. you have recent post with this

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    

    you can create query posts, for example you want have recent tag or date or any thing

    query_posts('posts_per_page=5');
    

    or

    global $query_string;
    parse_str( $query_string, $args );
    $args[post_type] = array( 'post', 'video' );
    query_posts( $args );
    

    or

    query_posts( 'cat=1&tag=apples' );
    

    also see wp plug-ins and then customize in: