1
I have a taxonomy called Staff and a term called Professores, i created the page taxonomy-staff.php to display all teachers contained in taxonomy staff and taxonomy-staff-professor.php to display registered teachers with the term teacher, but it is not displaying the page, it even obeys the route and changes the title of the page, but the content does not appear. Can someone help me?
follows the link from taxonomy-stafftax-professor.php
https://jsfiddle.net/uxyaumj4/
<?php
get_header();
get_template_part( 'wp-files/partials/banner' );
?>
<div class="content">
<h3>Perfis dos professores</h3>
<?php
$args = array(
'posts_per_page' => -1,
'post_type' => 'staff',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'stafftax',
'field' => 'slug',
'terms' => 'professor',
)
)
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post();
$terms = get_the_terms( $post->ID, 'stafftax');
?>
<ul>
<li>
<a href="<?php echo get_permalink(); ?>">
<?php echo get_the_title(); ?>
</a>
</li>
</ul>
<?php
endwhile;
endif;
wp_reset_query();
?>
<?php get_footer() ?>
Include your code, the error is probably in it ;)
– leofontes