Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* Add option to filter WordPress sticky posts only in: [url] http://www.worldoweb.co.uk/2012/display-your-wordpress-recent-posts-on-a-static-page
- */
- $args = array( 'numberposts' => 6, 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date");
- $postslist = get_posts( $args );
- echo '<ul id="latest_posts">';
- foreach ($postslist as $post) : setup_postdata($post); ?>
- <?php if (is_sticky()){?>
- <li><strong><?php the_date(); ?></strong><br />
- <a href="<?php the_permalink(); ?>" title="<?php the_title();?>"> <?php the_title(); ?></a>
- </li>
- <?php } endforeach; //end if_sticky() and foreach()?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement