I have 2 Files:
index.php
newStuff.php
I want to get all posts with one specific category with this Code:
$args = array(
'posts_per_page' => 1000000000,
'cat' => '',
'paged' => get_query_var('paged'),
);
$q = new WP_Query($args);
if ( $q->have_posts() ) {
while ( $q->have_posts() ) {
$q->the_post();
if (get_the_category( $id )[0]->name == "Sportprojekte") {
}
}
}
Questions:
I duplicated
index.php
into newnewStuff.php
, but the new file generates all posts.Why does CSS stylesheet not showing up in the head?