WordPress.org

Ready to get started?Download WordPress

Forums

Pull post excerpt into div (3 posts)

  1. Maracas1970
    Member
    Posted 2 years ago #

    Hi all

    I am trying, slowly and painfully, to put together a basic site with a child theme. I have used the twenty eleven theme as the "mother"
    and created a new directory child folder with my stripped down CSS file.

    I`m currently trying to get the post excerpt from the blog page on my site, to feed into the left hand column on the homepage, the green div ;)

    here`s the site - http://www.gotodesigns.co.uk/

    I have my homepage set to static page, and am trying to style the posts a little as well, although this is also leading to some confusion, as although i edited the post id in my stylesheet, it displays the same way on the blog page,ie same size etc, as when you open the post.

    This is likely due to my lack of understanding of posts, pages, and the loop etc.

    Perhaps someone could rip open firebug and have a look, maybe and give back some indicators/clues.

    I have tried, read: reinstalled 5 or 6 times with new databases. Before i make a post, so i held out as long as possible.

    Thanks for time and understanding.

    Maracas

  2. Maracas1970
    Member
    Posted 2 years ago #

    So there is no way to present your post in the home page, whe you make a static home page?

  3. dragonsjaw
    Member
    Posted 2 years ago #

    Make sure you have set up a static front page
    Look into query posts in the codex.

    <div id="frontmainpostpull">
     <?php $temp_query = $wp_query; ?>
    <?php query_posts('&showposts=1'); ?>
    <?php while (have_posts()) : the_post(); ?>
      <div class="post" id="post-<?php the_ID(); ?>">
    	<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    	<?php the_excerpt(); ?>
      </div>

    This is what I have in twentyten on the front-page.php
    You may need to put it or something like it, somewhere else in twenty eleven.

Topic Closed

This topic has been closed to new replies.

About this Topic