WordPress.org

Support

Support » How-To and Troubleshooting » Post order based on tags

Post order based on tags

  • Good morning, I’d really appreciate it if someone could help me with my wordpress question.

    We have a sidebar on our website where we want to do the following:

    We want to always display three posts in a sidebar. The posts will either be from the News tag or the Featured tag. BUT we want the News tagged posts to always be posted first.

    Right now, this is the code I have. I can’t find a way to make the News tags always come first.

    <?php $loop = new WP_Query( array( 'tag' => 'news,featured', 'post_type' => 'dmc_projects','posts_per_page' => 3 ) ); ?>

    Thanks!

  • The topic ‘Post order based on tags’ is closed to new replies.