WordPress no-plugin show newest,hot,random post
Content 1. Show newest post 2. Show hot post 3. Show random post Show newest post: <ul><?php $post_query = new WP_Query(‘showposts=10′); while ($post_query->have_posts()) : $post_query->the_post(); $do_not_duplicate = $post->ID; ?> <li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></li> <?php endwhile;?> </ul> Show hot post: <ul><?php $post_num = 10; // set post number $args = array( ‘post_password’ => ”, ‘post_status’ => ‘publish’, // just show published post. ‘post__not_in’ => array($post->ID),//exclude current post ‘caller_get_posts’ => 1, // exclude sticky post ‘orderby’ => ‘comment_count’, // post order by comment count ‘posts_per_page’ => $post_num ); $query_posts = new WP_Query(); $query_posts->query($args); while( $query_posts->have_posts() ) { $query_posts->the_post(); ?> <li><a href=”<?php the_permalink(); ?>” title=”<?php the_title(); ?>”><?php the_title();…