Ich mag meine Homepage, um nicht nur eine Kategorie aufzulisten, sondern alle Kategorien, Gruppen per Post. Hier ist die Anfrage:
Katze
und die Post wird sein:
Post
Ich mag es, Katze: 5,2,4,3,1 und wenn sie aufgelistet sind, alle Post von Katze 5, dann alle Post von Katze 2, und so weiter
So wird das Ergebnis post sein:
hoffe das beispiel ist klar genug, dass du mir helfen kannst … danke im vorraus
Hier ist eine allgemeine Struktur wie ich es machen würde:
$categories = array(5,2,4,3,1); //manually enter the array of the category ids in the order how you want them to appear foreach( $categories as $cat ) { $args = array( 'category__in' => array( $cat ), 'posts_per_page' => -1 ); $cat_query = new WP_Query( $args ); if( $cat_query->have_posts() ) : while( $cat_query->have_posts() ) : $cat_query->the_post(); //enter here, whatever you want to show per post// endwhile; endif; } //end of foreach