WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
query-posts by popular? (1 post)

  1. andy999
    Member
    Posted 4 months ago #

    Hi,

    I need to do some fairly advanced styling on some posts and I'd like to query the data stored by WPP to output it, I'm not much of a database expert though so I'm not sure what my array should contain.

    <?php 
    
    			$featuredPosts = new WP_Query( array(
    
    			    'meta_key'=>'????????????????????????',
    			    'orderby' => 'meta_value_num',
    			    'order' => DESC
    				) );
    			 ?>
    
    				<?php if ( $featuredPosts->have_posts() ) : ?>
    
    				<?php while ( $featuredPosts->have_posts() ) : $featuredPosts->the_post(); ?>
    
    				<article <?php post_class('item-post block'); ?> id="post-<?php the_ID(); ?>">
    				<?php the_title; ?>
    			</article> <!-- end div post -->
    
    				<?php endwhile; wp_reset_query(); ?>
    
    				<?php endif; ?>

    http://wordpress.org/plugins/wordpress-popular-posts/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.