Viewing 7 replies - 1 through 7 (of 7 total)
  • Look at the WordPress Default theme’s wp-content/themes/default/index.php and how it utilizes the template tag, the_time(), and comments_popup_link.

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

    Thread Starter chaseblackwell44

    (@chaseblackwell44)

    Ha, strangely all that is included in the default index.php file on my server is:

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    get_header(); ?>
    
    	<div id="content" class="narrowcolumn" role="main">
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</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>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    No mention of template tag or date to be found.

    I found the comment tag, however.

    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

    How exactly would I know where to place this in my templates index.php file? Guess and check?

    When you visit Administration > Appearance > Themes, what is the name of the theme you are using? It will also tell you All of this theme’s files are located in /themes/xxxxxxx where xxxxxx is the folder name for that theme.

    Thread Starter chaseblackwell44

    (@chaseblackwell44)

    Sure, I know my theme. I mean’t more where do I input the code in order to get it to appear where I’d like it to beneath the border of my title?

    After something like:
    <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>

    Thread Starter chaseblackwell44

    (@chaseblackwell44)

    Okay well, I got it up there, but how do I get it aligned correctly? I’m guessing through CSS, but how do I get CSS to distinguish between the comments at the top vs the bottom?

    Thread Starter chaseblackwell44

    (@chaseblackwell44)

    Also, I could use some help getting the date up there with the right mm/dd/yyyy format.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding date and comment data below title’ is closed to new replies.