WordPress.org

Ready to get started?Download WordPress

Forums

Need Help Setting Up single.php (3 posts)

  1. Andrew
    Member
    Posted 2 years ago #

    Hello.

    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:

    <?php
    
    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; ?>
    
    </div>
    
    <?php get_footer(); ?>

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

    Please help.

    Thank you,

    Andrew

  2. justingreerbbi
    Member
    Posted 2 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
    Member
    Posted 2 years ago #

    Yeah, I use CSS to move the image over.

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

    Thank you,

    Andrew

Topic Closed

This topic has been closed to new replies.

About this Topic