• Resolved Prometheus Fire

    (@prometheus-fire)


    I have CPT ‘movie’, with the following taxonomies: genre, director, and actor.

    The code used to register these is this: https://pastebin.com/yJ9XHCDk

    I have an archive movie page working using the following code in archie-movie.php:

    <?php get_header(); ?>
    	<div id="middle" class="clearfix">
    		<div id="inner">
    		<div id="content" class="<?php echo $bw; ?>">
    		    <?php get_template_part( 'part-genrenav'); ?>
    
    			<div id="pageHead">
    			<?php global $post; if(is_archive() && have_posts()) :
    			if ( is_post_type_archive() ) { ?>
    			<h1><?php post_type_archive_title(); ?></h1>
    			<?php }	?>
    			<?php endif; ?>
    			</div>
    
    			<div class="posts clearfix">
    			<?php get_template_part( 'part-pagination'); ?>
    			<?php while (have_posts()) : the_post(); ?>
    			<?php get_template_part( 'part-movie'); ?>
    			<?php endwhile; ?>
    			<?php get_template_part( 'part-pagination'); ?>
    			</div>
    		</div>
    		</div>
    		</div>
    
        <?php get_footer(); ?>

    Taxonomy.php

    I’ve created a taxonomy.php (and a taxonomy-genre.php and so on). Taxonomy.php is being called correctly here, but the loop in that template returns nothing. I’ve been back and forth through dozens of articles, but can’t seem to figure it out.

    Currently, my taxonomy.php file is made up of this, as you can see it isn’t much different than they archive-movie.php file above. I just can’t figure out why it doesn’t work:

    <?php get_header(); ?>
    
    		<div id="middle" class="clearfix">
    		<div id="inner">
    		<div id="content">
    
    		<div id="pageHead"><h1>Taxonomy Archive</h1></div>
    
                    <div class="posts clearfix">
    		<?php get_template_part( 'part-pagination'); ?>
    		<?php while (have_posts()) : the_post(); ?>
    		<?php get_template_part( 'part-movie'); ?>
    		<?php endwhile; ?>
    		<?php get_template_part( 'part-pagination'); ?>
    		</div>	
    
    		</div>
    		</div>
    		</div>
    
     <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Taxonomy Archive not displaying entries’ is closed to new replies.