post featured thumbnail not showing on post page (but it does on category page)
-
Hello!
When I am viewing the category page, the thumbnail shows how I would like them to. However on the ‘posts’ page for this particular category, the thumbnail doesn’t show yet the code for both pages is exactly the same. (I am creating my own theme)
Here is the code for my “posts” page
<?php /* Template Name: Beatmaking */ ?> <?php get_header(); ?> <div class="row" id="beat-making-content"> <div class="col-12"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="post-thumb"> <?php if (has_post_thumbnail()) { the_post_thumbnail(); } ?> </div> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; else: endif; ?> <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1 class="text-center"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <p><?php the_content(); ?> <hr> <?php endwhile; else: endif; ?> </div><!-- END COLUMN 1 of ROW 2 (Main Content)--> </div><!--END ROW 2 (CONTENT) --> </body> </html>
the code for the category page is exactly the same and shows how I like, but the posts page doesnt. Any ideas?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘post featured thumbnail not showing on post page (but it does on category page)’ is closed to new replies.