Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function NewCoupons($num=5){
- global $wpdb;
- $STRING = "";
- $query = array (
- 'posts_type' => 'post',
- 'orderby' => 'date',
- 'order'=> 'DESC'
- );
- $posts = new WP_Query($query);
- foreach($posts as $post){
- $STRING .="<li><a href='".get_permalink($post->ID)."'>".$post->post_title."</a> - <em>".get_post_meta($post->ID, 'hits', true)." ".$GLOBALS['_LANG']['_tpl_edit_b3']."</em></li>";
- }
- wp_reset_query();
- print $STRING;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement