WordPress.org

Forums

Only one post showing for my new theme layout (7 posts)

  1. tyzer
    Member
    Posted 9 years ago #

    Hi,

    I've totally new to wordpress and blogging in general and i only have limited skills in editing html and php code.

    I've setup a blog here, http://www.adquick.co.uk/blog/ and i have tried to edit the theme to make it look like my website, and although everything looks fine, when i try to post a 2nd message, it automatically replaces the first post, so that theres only every 1 post on the blog page.

    Please could someone let me know what i should check to make this work.

    I know for sure that the other themes work fine so it must be something that i've edited to make it not work.

  2. Chris_K
    Member
    Posted 9 years ago #

    Logged in as admin, go to Options -> Reading. What do you have set for "Show at most:" (top option)?

  3. tyzer
    Member
    Posted 9 years ago #

    thanks for the reply.

    i've got it as 10. i put the default theme back and it was fine, when i did a 2nd post both posts showed up, so maybe its something i have done to the index.php file, but i'm not sure.

  4. Chris_K
    Member
    Posted 9 years ago #

    I'd agree - if it works in default, but not in your own customized theme then you probably want to check your theme's The_Loop and make sure you didn't break something.

  5. tyzer
    Member
    Posted 9 years ago #

    hi, i've spent the last few hours trying to get my head round this, but i just can't. Could you have a look at the code below which is my index.php file, and see if i should make any changes to it, i know it looks a bit messy compared to how most people have their index.php files, but the layout worked perfect, i just can't get it to show all my blog posts.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <meta name="Keywords" content="Keywords" />

    <link rel="stylesheet" type="text/css" href="http://www.adquick.co.uk/temp2/aran.css" media="screen" title="studio7designs (screen)" />
    <title>adquick.co.uk - Buy and Sell Text Ads Quick</title>
    <style type="text/css">
    <!--
    .style11 {font-size: 1.8em}
    .style29 {color: #7594C0}
    .style38 {font-size: 11px}
    .style22 {font-size: 1.4em}
    .style32 {color: #323232}
    .style39 {font-size: 12px; font-weight: bold; }
    .style43 {font-size: 12px}
    -->
    </style>
    </head>

    <body>

    <div id="leftsidebar">
    <img id="header" src="http://www.adquick.co.uk/temp2/header.jpg" width="760" height="35" alt="header" />
    <div id="menu">
    <h2 class="hide">Menu:</h2>

    <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">Register</a></li>
    <li><a href="#">Login</a></li>
    <li><a href="#">My Account </a></li>
    <li><a href="#">Website Owners </a></li>
    <li><a href="#">What is adquick? </a></li>
    </ul>
    </div>
    <div id="content2">
    <div align="right">
    <div align="right">
    <div id="div">
    <div align="right">
    <div class="main2">
    <div id="content" >
    <?php if (have_posts()) : the_post(); ?>
    <div class="post">
    <h1><a href="http://adquick.co.uk/blog">">
    <?php the_title(); ?>
    </a></h1>
    <div id="edit">
    <?php edit_post_link('Edit', '', ''); ?>
    </div>
    <?php the_content(__('(more...)')); ?>
    <div id="meta">
    <h3>About this post</h3>
    Posted
    <?php the_time('F jS, Y') ?>
    by
    <?php the_author() ?>

    </div>
    </div>
    <?php comments_template(); // Get wp-comments.php template ?>
    <?php endif; ?>
    </div>
    <p align="left">&nbsp;
    <p align="left">&nbsp;

    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <?php get_footer(); ?>
    </div>
    </body>
    </html>

  6. yosemite
    Member
    Posted 9 years ago #

    HandySolo gave you a link. The answer is there.

    Hint1: <?php if (have_posts()) : the_post(); ?> is not right.

  7. tyzer
    Member
    Posted 9 years ago #

    thanks guys, its all sorted now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags