cloned category.php doesn't load a post!
-
Hello People!
I want to setup a template file in my theme, which shows ALL the posts of my site.
i’ve cloned category.php, named it into “grid.php”, gave it the template-name “Grid” inside the code and created a site with the new template “Grid”.
But now: It doesn’t load any post! I want it to load all posts on my site. How can i ged rid of this?
Thanx in advance!!
Here’s the URL: https://www.timrodenbroeker.de/grid/
And this is the code:
<?php/* Template Name: Grid */ ?> <?php get_header(); ?> <?php if ( have_posts() ): ?> <ol> <?php while ( have_posts() ) : the_post(); ?> <article> <div class="articlethumb"><?php if ( has_post_thumbnail()) : ?> <?php // Wenn Kategorie 20 oder 35 if (in_category( "20" ) or in_category( "35" )) { // Wenn Kategorie 20 if (in_category( "20" )) { the_post_thumbnail(); } // Wenn Kategorie 35 if (in_category( "35" )) { echo '<div class="quadrat"><a href="'; the_permalink(); echo '">'; the_post_thumbnail(); echo '</a></div>'."\n"; } } else { // Die restlichen echo '<a href="'; the_permalink(); echo '">'; the_post_thumbnail(); echo '</a>'; } ?> <?php endif; ?> </div> <div class="articledesc"><?php the_title(); ?></div> </article> <?php endwhile; ?> </ol> <?php else: ?> <h2>No posts to display</h2> <?php endif; ?> <div class="bottomnav"><a class="super next"><?php posts_nav_link(' / ','Zurück','Weitere Projekte'); ?></a></div> <?php get_footer(); ?>
- The topic ‘cloned category.php doesn't load a post!’ is closed to new replies.