I have a custom post type called Projects, and an archive page, archive-projects.php. At one point, it was working, displaying the thumbnail and permalink as programmed on the template.
get_header(); $object = get_queried_object(); $taxonomy = empty( $object->taxonomy ) ? false : get_taxonomy( $object->taxonomy ); ?> <main role="main"> <?php if ( have_posts() ) : ?> <div style="float:left; width:300px;"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a> <a href="<?php the_permalink(); ?>"<?php the_excerpt(); ?> </a> </div> <?php endif; ?> </main>
I have just updated the plugin, and now the archive page doesn’t work. I don’t know whether or not it was due to the update. I have two projects, but they don’t display on the archive page
I have also tried
<?php get_header(); ?>instead of the first line in the above code.
- The topic ‘Archive not displaying any posts’ is closed to new replies.