WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I'm working on are the pages that you go to after clicking on a custom taxonomy on the front-end. I'm to the point where I've duplicated category.php, renamed it taxonomy-tr_property_region.php so that I can edit how posts with the taxonomy tr_property_region are displayed.

If I understand correctly I need to edit loop.php, but I don't want taxonomy-tr_property_region.php to look the same as taxonomy-language.php is there a way to not use get_template_part( 'loop', 'category' );

Example being I want to change this

get_template_part( 'loop', 'category' );

To be something more like this,

  $loop = whatever replaces get_template_part( 'loop', 'category' ); 
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>

<div class="fullWidthContent">
<div class="trPropSearchHeader">
  <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
  <?php $meta = get_post_meta(get_the_ID(), 'rw_propCity', true); echo $meta; ?>
<div class="trPropSearchThumbnail">
  <?php if ( has_post_thumbnail()) : ?>
    <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
      <?php the_post_thumbnail('thumbnail'); ?>
  <?php endif; ?>
<div class="trPropSearchDetailsContainer">          
  <?php $meta = get_post_meta(get_the_ID(), 'rw_propBedrooms', true); echo $meta; ?>
  <?php $meta = get_post_meta(get_the_ID(), 'rw_propBathrooms', true); echo $meta; ?>
  <?php $meta = get_post_meta(get_the_ID(), 'rw_propDesc', true); echo $meta; ?>
<div class="clear"></div>  
<?php endwhile; ?>
share|improve this question
up vote 0 down vote accepted

This is how i would do it:
why not just include another loop.php in its place, for example copy loop.category.php, rename it to something like loop-copy.php make your changes to it and call it to the template as <?php get_template_part( 'loop', 'copy' ); ?>.

share|improve this answer
thank you, that was exactly what I needed. – Chuck Jun 21 '11 at 21:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.