I'm new to template editing in wordpress and I'm trying to get a page description to show up on my site but it is not appearing. The URL I'm trying to get to display the description is here:
http://fourwallsla.com/category/the-neighborhood/east-side/
and I've attached the screenshot of the page description within wordpress. It appears to be using the archive template (why is it not using the page template?).
Here's the code for the archive template:
<?php get_header(); ?>
<div class="main">
<!--<?php iinclude_page(17); ?>-->
<?php
$category = get_the_category();
$catName = $category[0]->cat_name;
$catName = strtolower($catName);
?>
<?php if (have_posts()) : $first = true; ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h1><?php single_cat_title(); ?></h1>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h1><?php single_tag_title(); ?></h1>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h1><?php echo get_the_time('F jS, Y'); ?></h1>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1><?php echo get_the_time('F, Y'); ?></h1>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h1><?php echo get_the_time('Y'); ?></h1>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1><?php _e( 'Author Archive', 'gray_white_black' ); ?></h1>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h1><?php _e( 'Blog Archives', 'gray_white_black' ); ?></h1>
<?php } ?>
<div>
<?php
switch ($catName)
{
case "east side":
iinclude_page(17);
break;
case "downtown":
iinclude_page(20);
break;
case "mid-city":
iinclude_page(15);
break;
case "west side":
iinclude_page(23);
break;
case "coastal":
iinclude_page(27);
break;
case "valley":
iinclude_page(25);
break;
default:
iinclude_page(6);
}
?>
</div>
<ul class="post-list">
<?php while (have_posts()) : the_post();
if($first) $class = "first-in-row";
else $class="";
$first = !$first;
?>
<!-- Start: Post -->
<li <?php post_class($class); ?>>
<?php the_post_thumbnail(); ?>
<p class="categories"><?php the_category(", "); ?></p>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> <?php edit_post_link(__('Edit', 'gray_white_black'), '', ''); ?></h2>
<?php the_excerpt(); ?>
<p class="more"><a href="<?php the_permalink() ?>"><?php _e( '»» ', 'gray_white_black' );?></a></p>
<?php if(has_tag()): ?><p class="tags"><span><?php the_tags(""); ?></span></p><?php endif; ?>
</li>
<!-- End: Post -->
<?php endwhile; ?>
</ul>
<p class="pagination">
<span class="prev"><?php next_posts_link(__('« Previous Posts', 'gray_white_black')) ?></span>
<span class="next"><?php previous_posts_link(__('Next posts »', 'gray_white_black')) ?></span>
</p>
<?php else : ?>
<h2><?php _e( 'Not found', 'gray_white_black' ); ?></h2>
<p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'gray_white_black' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Where, in the code above, the_post(), appropriately, refers to the content for the home listing within the category displayed on the page. But how do I get the_post() for the page itself, shown in the screenshot? Thanks.
archive.php
, right?archive.php
?