WordPress.org

Ready to get started?Download WordPress

Forums

single.php doesn't change anything! (1 post)

  1. KarraGirl
    Member
    Posted 6 years ago #

    I've been trying to add a simple php code under my posts (I want a little "permalink" next to "comments"). I know I'm supposed to do that in single.php, but no matter what I do, it doesn't have any effect on my site at all! How is that possible? I have tried to paste other codes (which are 100% correct and SHOULD work), but still no changes on my site.

    Here's my single.php :

    <?php get_header(); ?>

    <div id="content">

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2 class="posttitle"><?php the_title(); ?></h2>
    <div class="postdate">
    <?php $sweetdreams_author = sweetdreams_author(); if ($sweetdreams_author == 'true' ) {
    the_author(); echo ' '; _e('on');
    } ?>
    <?php the_time(get_settings('date_format')); ?> <?php _e('at'); ?> <?php the_time(); ?>
    <?php if (function_exists('time_since')) { ?>
    <span><?php echo time_since(abs(strtotime($post->post_date_gmt . " GMT")), time()); ?> <?php _e('ago'); ?></span>
    <?php } ?>
    </div>
    <div class="postbody">
    <?php the_content(__('Continue reading') . "\"" . the_title('', '', false) . "\" »"); ?>
    <?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    </div>
    <div class="postmeta">
    <?php _e('Filed under'); ?> <?php the_category(', '); ?>
    <?php edit_post_link(__('Edit'), ' | ', ''); ?>
    </div>
    </div>

    <?php comments_template(); ?>

    <div class="navigation">
    <div class="previous"><?php previous_post_link('« %link') ?></div>
    <div class="next"><?php next_post_link('%link »') ?></div>
    </div>

    <?php endwhile; else: ?>

    <div class="post">
    <h2 class="posttitle"><?php _e('Not Found'); ?></h2>
    <div class="postbody">
    <p><?php _e('Sorry, but no posts matched your criteria.'); ?></p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    </div>
    </div>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic