WordPress.org

Support

Support » How-To and Troubleshooting » Displayed on Website, linking title, displaying whole post?

Displayed on Website, linking title, displaying whole post?

  • Hi!

    I’ve just intergrated wordpress onto my homepage of my site: http://www.deadandwalking.com/

    However, it only displays a snippet of a post, and it doesn’t link the post title to the post, only a read more link. I want the whole post to be displayed with images and bold/itialic etc…

    Here is the code that I have used in my index file:

    <?php
    // Include WordPress
    define('WP_USE_THEMES', false);
    require('./blog/wp-load.php');
    query_posts('showposts=10');
    ?>
    <?php while (have_posts()): the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <?php the_excerpt(); ?>
    <p><a href="<?php the_permalink(); ?>">Read more...</a></p>
    <?php endwhile; ?>
    </p>

    If anyone could help me out on how to accomplish the above, i’d be so happy! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php the_excerpt(); ?> strips formatting and displays snippet

    swap for <?php the_content(); ?> to get full formatted post

    also….
    <h2><?php the_title(); ?></h2> displays only title

    swap for:
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    to get linked title

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Displayed on Website, linking title, displaying whole post?’ is closed to new replies.