Today we’ll learn how templates work pertaining to categories and how to format those custom fields on our live site.
Part A - ID Lookup & Create a New Page:
The first thing we need to do is to learn which id numbers go with which categories. Manage » Categories (in the WP Admin) will show you a list of your current categories and their ID numbers. In this example, we will take note of ‘Listings’ with the ID #3. If you navigate to this ‘wp-content/themes/default2′ directory (assuming you downloaded this theme from earlier and are using it), you will find a series of files including page.php. Open ‘page.php’ and save it as ‘category-3.php’. Where 3 is the category id number of the ‘Listings’ category in this example. We will be working on this new ‘category-3.php’ file soon, but first we need to grab a new plugin.
Part B - Install a New Plugin:
Download and install the Get Custom Field Values plugin. We will be using this plugin to display our extra data on our new ‘category-3.php’ file or rather our new Listings page.
Part C - Finding & Adding Code:
Find this line of code: <?php the_meta() ?> in your file and remove it. If you do not find this, make yourself some room right after this piece of code:
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
by entering some new lines.
Now we can add this code:
<?php echo c2c_get_custom('Price', '<strong>Price:</strong> ', '<span>|</span>'); ?>
Repeat this process for your other custom fields.
Your final category-3.php file may look like the following:
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php echo c2c_get_custom('Price', '<strong>Price:</strong> ', ' <span>|</span>'); ?> <?php echo c2c_get_custom('Location', '<strong>Location:</strong> ', ' <span>|</span>'); ?> <?php echo c2c_get_custom('Agent', '<strong>Agent:</strong> ', ''); ?><br />
<?php echo c2c_get_custom('Beds', '<strong>Beds:</strong> ', ' <span>|</span>'); ?> <?php echo c2c_get_custom('Baths', '<strong>Baths:</strong> ', ' <span>|</span>'); ?> <?php echo c2c_get_custom('Acres', '<strong>Acres:</strong> ', ' <span>|</span>'); ?> <?php echo c2c_get_custom('Status', '<strong>Status:</strong> ', ''); ?><br />
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Save this page and upload it to your the ‘wp-content/themes/default2′ directory. You should end up with something similar to the screen shot below if you navigate to this address…. ‘yoursite.com/category/listings/’

Tips:
- Visit this page to learn more about the Wordpress template system.
- Make sure all of your new real estate listings are assigned to your ‘Listings’ category when you create a new post.
- Make sure your new category-#.php has the same ID as your ‘Listings’ category and is uploaded to your current themes directory.
- Your new code consists of 3 parts. P1 - the name of your custom field; P2 - the contents before the value of the field; P3 - the contents after the value of the field.
<?php echo c2c_get_custom('P1', 'P2', 'P3'); ?> - Put your questions on the comment section of this post. You might have a similar problem or question that I can post the answer to!