Post order based on tags (1 post)

  1. command_z
    Posted 4 years ago #

    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 ) ); ?>


Topic Closed

This topic has been closed to new replies.

About this Topic