Need Help Setting Up single.php (3 posts)

  1. Andrew
    Posted 3 years ago #


    single.php is the file for what is shown when a permalink is clicked?

    Can anyone help me set up my single.php file?

    When I click a permalink for a post, all the posts show. Pretty much the same as index.php but with the URL of the post.

    Here is my single.php code:

    get_header(); ?>
    <div id="Wrapper">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php the_content(); ?>
    <?php comments_template(); ?>
    <?php endwhile; else: ?>
    <p><?php _e( 'Sorry, no posts matched your criteria.', 'PreviouslyLostLamp' ); ?></p>
    <?php endif; ?>
    <?php get_footer(); ?>

    The URl to the web page is http://www.LoveSpelles.com

    Please help.

    Thank you,


  2. Justin Greer
    Volunteer Moderator
    Posted 3 years ago #

    Looks to me that you are going about the template in the wrong direction. I took a look at the source code and the html structure is not how it show be. Are you using css to move the div with the featured image over to look like it is in the right side?

    You are correct about the single.php being what is used to display a single post. The following is taken straight from another template but it will get you in the right direction in that department.

    [code moderated - please use the pastebin for any code longer than 10 lines - see forum rules]

  3. Andrew
    Posted 3 years ago #

    Yeah, I use CSS to move the image over.

    Also, the code was blocked. Can you repost it please?

    Thank you,


Topic Closed

This topic has been closed to new replies.

About this Topic