• Resolved robpannell

    (@robpannell)


    Hi there, I’m trying to customise the single.php with where the number of comments is shown. Can someone please help me out with the php?

    If you look at https://www.robpannell.com/testing you’ll see that the number of comments is currently showing in black immediately after the post title.

    I’d like to move it so that it shows “comments: 1” along with the dates just underneath.

    The current code is as follows:

    <?php
    get_header();
    ?>

    <div id=”content”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”entry”>
    <h3 class=”entrytitle” id=”post-<?php the_ID(); ?>”> ” rel=”bookmark”>
    <?php the_title(); ?>
    </h3>

    <div class=”entrymeta”>
    Posted
    <?php
    the_time(‘F j, Y ‘);
    $comments_img_link= ‘<img src=”‘ . get_stylesheet_directory_uri() . ‘/images/comments.gif” title=”comments” alt=”*” />’;
    comments_popup_link($comments_img_link .’ Comments(0)’, $comments_img_link .’ Comments(1)’, $comments_img_link . ‘ Comments(%)’);
    if (function_exists(‘enp_edit_link’)) { enp_edit_link(__(‘ Edit This’)); }
    else { edit_post_link(__(‘Edit This’)); } ?>
    </div>

    <div class=”entrybody”>
    <?php the_content(__(‘Read more »’));?>
    </div>
    <?php trackback_rdf(); ?> </div>
    <?php comments_template(); // Get wp-comments.php template ?>
    <?php endwhile; else: ?>
    <p>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    </p>
    <?php endif; ?>
    <p>
    <?php posts_nav_link(‘ — ‘, __(‘« Previous Page’), __(‘Next Page »’)); ?>
    </p>

    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Customising theme – need php help please’ is closed to new replies.