Support » Fixing WordPress » Show post category next to post date on Archive page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Tip: Some themes do this by default and are Open to the Public…while we cannot point you to a theme specifically, look for one with theme options..

    I want to continue to use this same theme. Here is a copy of the archives.php file for the Manifest theme:

    [please mark any posted code – – the code below was posted unmarked and is partially corrupted]

    Template Name: Archives
    <?php get_header(); ?>
    <div id="coreContent">
      <div id="archives" class="single hentry">
        <h2 class="entry-title"><?php the_title(); ?></h2>
        <?php query_posts('cat=&showposts=15'); ?>
        <ul id="recentPosts">
        		<?php while (have_posts()) : the_post(); ?>
             <a>" rel="bookmark"><?php the_title(); ?></a>
             <div class="postDate"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_date('F j, Y') ?></abbr></div>
        		<?php endwhile; ?>
        <div id="date">
            <?php wp_get_archives('type=monthly&show_post_count=1'); ?>
           <ul class="categories">
           <?php wp_list_categories('title_li=&show_count=1'); ?>
        <div id="cattags">
          <ul class="categories">
          <?php wp_list_categories('title_li=&show_count=1'); ?>
    <?php get_footer(); ?>


    Forum Moderator

    the general code to use is

    – either:

    <div class="post-cat"><?php the_category(', '); ?></div>

    – or:

    <div class="post-cat"><?php $post_cats = get_the_category(); ?><a href="<?php echo get_category_link($post_cats[0]->term_id); ?>"><?php echo $post_cats[0]->name; ?></a></div>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show post category next to post date on Archive page.’ is closed to new replies.