View Single Post
Old 08-22-2008, 06:48 PM  
Snake Doctor
I'm Lenny2 Bitch
 
Snake Doctor's Avatar
 
Join Date: Mar 2001
Location: On top of my soapbox
Posts: 13,449
Quote:
Originally Posted by Jdoughs View Post
Nah dont create a page at all. The tags are pulled usually from the archive.php, it runs the same page, same template. Here;s a good example, its just from the default kubrick (newer).

The top part of the archive.php tells wp how to display the tags for this version of the theme, I have used this code on other themes to incorporate tags on them as well.

Code:
<?php get_header(); ?>

	<div id="content" class="widecolumn">
<?php is_tag(); ?>
		<?php if (have_posts()) : ?>

 	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
 	  <?php /* If this is a category archive */ if (is_category()) { ?>
		<h2 class="pagetitle">Archive for the ?<?php single_cat_title(); ?>? Category</h2>
 	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
		<h2 class="pagetitle">Posts Tagged ?<?php single_tag_title(); ?>?</h2>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
 	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
 	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h2 class="pagetitle">Author Archive</h2>
 	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h2 class="pagetitle">Blog Archives</h2>
 	  <?php } ?>


		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
		</div>

		<?php while (have_posts()) : the_post(); ?>
		<div class="post">
				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
				<small><?php the_time('l, F jS, Y') ?></small>

				<div class="entry">
					<?php the_excerpt() ?>
				</div>

				<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

			</div>

		<?php endwhile; ?>

		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
		</div>

	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<?php include (TEMPLATEPATH . '/searchform.php'); ?>

	<?php endif; ?>

	</div>

<?php get_footer(); ?>
The tags, categories, and searches (I believe) all are pulled from this archive.php, it decides if its a category, tag or archive page then displays accordingly, so this is where you edit how they perform

If you get them added and working but you cannot get the excerpts to show, look for a peice of code looking like this <?php the_content() ?> OR <?php the_post() ?> (cant remember) and change it to <?php the_excerpt() ?> ** if they dont show only exerpts from their, make sure you have exerpts added on the post itself (you may have no text added in the exerpt, so it pulls them all.

If your havin a hard time following what im tryin to say, hit me up at 464 / 281 / 250
I don't have an archive.php template. I do have a category.php, date.php, search.php....just nothing for tags.

I either need to make one for tags or find out which one wordpress uses by default.

Off to the codex I go.
__________________
sig too big
Snake Doctor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote