1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Display a post in wordpress (Simple fix?)

Discussion in 'Blogging' started by S1lv3rdo7, Aug 26, 2013.

  1. S1lv3rdo7

    S1lv3rdo7 Regular Member

    Joined:
    Jul 17, 2010
    Messages:
    480
    Likes Received:
    315
    Occupation:
    Tech Support
    Location:
    Austin, TX
    I downloaded the theme blackbird from wordpress, and I'm trying to figure out how to display just normal posts on a page. All it has is a home page and doesn't have the normal wordpress display that has the side widgets and everything like a normal wordpress blog.

    If I create a page and put some code on it, it shows the comment box and share boxes etc. What's the codes to just display the last 5 or so posts?
     
  2. S1lv3rdo7

    S1lv3rdo7 Regular Member

    Joined:
    Jul 17, 2010
    Messages:
    480
    Likes Received:
    315
    Occupation:
    Tech Support
    Location:
    Austin, TX
    Looks like I deleted some pages I shouldn't have. I just deleted and re-installed the theme. Sorry for the wasteful post.

    I found the code too. I should just wait 5 minutes before I come make a thread here. I usually figure it out. I'm an idiot. Sorry.
    Code:
    <ul>
    <?php $the_query = new WP_Query( 'showposts=5' ); ?>
    <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    <li><?php the_excerpt(__('(more...)')); ?></li>
    <?php endwhile;?>
    </ul>