I have created a custom post type named property
, and a taxonomy named city
is attached to this post type. There are several cities (terms) like toronto
, taiwan
,dhaka
.
I want to create a template which can show all the post under a city. I have created file taxonomy-city.php
, but it is not working .
Here is my code for taxonomy-city.php
file .
<?php
/*
* Template name: City
*/
get_header();
?>
<div id="page_content">
<div class="page-wrapper">
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<div id="page_content_wrapper">
<div id="careers_table">
<p class="content_text">asdsd</p>
</div>
<?php endwhile; ?>
<?php else : ?>
<div class="post">
<h3><?php _e('404 Error: Not Found', 'cmeasytheme'); ?></h3>
</div>
<?php endif; ?>
</div>
<div style="clear:both;"></div>
</div>
</div>
<?php get_footer(); ?>
It shows everything, but doesn't print out anything inside the loop.
I have visited these link too , but none of them came to any help