[resolved] Loop help; displaying single posts (4 posts)

  1. invisibled
    Posted 8 years ago #

    Hey everybody,

    i'm fairly new to wordpress, and i'm building a website out of it. I decided to use wordpress for it becuase all the pages are just text and its a simple site.

    I put the different sections content in different posts, and i want to display 1 post on the homepage (its the newest post in a catgegory called "pages")and then i have the post titles listed in a loop acting as the menu.

    when i click on the page titles the browser title changes to the correct one, and the url changes correctly, but the content always stays as the newest post.

    is there a certain file i have to make, for example page.php or archive.php

    any help would be great! Here is a link to the live site:


    and here is the code for displaying the content:

    <?php if (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <div class="entry">
    <?php the_content(); ?>
    <?php endif; ?>
  2. Jeremy Clark

    Posted 8 years ago #

    Can't tell much about the site your using localhost as the site url. It should be the url you use to access the site from outside your network. But you might want to have a look of this.

  3. invisibled
    Posted 8 years ago #

    ohh ignore that about link in the menu, i'm tlaking about the page titles listed int he blue area sorry


    yeah i've read all the documentation, and i think i am just missing somthing small or doing somthing slighly wrong

  4. invisibled
    Posted 8 years ago #

    well i've figured out that when i query_posts("cat=1"); out of the code everything works fine.

    so now i just need to get it to display the certain categories properly

Topic Closed

This topic has been closed to new replies.

About this Topic