0
I have several posts and some of them have a category called "Featured" and the others are without category, what I need to do is list all these posts, and the first always need to be the "Featured" category regardless of when they were posted.
The code I have is simply listing all posts, I’ve tried using the command oderby
only that without success, I may have done wrong too.
My code is this:
<?php $posts = get_posts( array('post_type'=>'sala', 'numberposts'=>-1, 'order'=>'ASC') ); ?>
<?php setup_postdata($post);?>
<?php foreach($posts as $post):
/* mostro salas */
<?php endforeach;?>
I don’t have much experience with Wordpress.