0

I've been building a website that involves a child theme of Twenty Twelve and a custom post type with associated custom taxonomy, "area". I've built a template file (cribbed from code found elsewhere) to render an taxonomy archive of this post type, taxonomy-area.php.

I've been experimenting on my desktop MAMP install, and when I get things the way I like them, upload them to my web hosting service (Dreamhost, fwiw), or reproducing the configuration there. Not the most efficient way to do business, I admit, but I haven't had any success with any of the staging/production plugins.

Anyhow, this taxonomy-area.php file works as expected on my desktop. But the "meat" of the template fails to render—that is, the PHP between <? get_header(); ?> and <?php get_sidebar(); ?>

That code is as follows:

    <section id="primary" class="site-content">
    <div id="content" role="main">
 <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
  <?php 
   $posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1');
  if (have_posts()) : ?>
<header class="archive-header">
    <h1 class="archive-title">Area Listing: <?php echo $term->name; ?></h1>
 </header>
  <dl>
    <?php while (have_posts()) : the_post(); ?>
      <?php $url = get_post_meta($post->ID, 'honyaku_url', true); ?>
      <?php $desc = get_post_meta($post->ID, 'honyaku_description', true); ?>
        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <header></header>
        <div class="entry-content">
        <dt>
          <a href="<?php echo $url; ?>" title="<?php the_title(); ?>" rel="bookmark">
            <?php the_title(); ?>
          </a>
        </dt>
        <dd><?php echo $desc; ?></dd>
        <div><!-- class="entry-content" -->
        </article>
    <?php endwhile; ?>
    </dl>
  <?php endif; ?>

    </div><!-- #content -->
</section><!-- #primary -->      

The output HTML is as follows:

<section id="primary" class="site-content">
    <div id="content" role="main">



    </div><!-- #content -->
</section><!-- #primary -->   
  • Turn on debugging, please and post what you see. – Wyck Jan 12 '13 at 3:18
1

Never mind. Appears to be a PEBCAK situation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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