WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. invisibled
    Member
    Posted 7 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:

    http://invisibled.com/polarexpressions.ca/

    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(); ?>
    </div>
    </div>
    <?php endif; ?>
  2. Jeremy Clark
    Moderator
    Posted 7 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
    Member
    Posted 7 years ago #

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

    http://invisibled.com/polarexpressions.ca/

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

  4. invisibled
    Member
    Posted 7 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