Displayed on Website, linking title, displaying whole post? (3 posts)

  1. gorepit
    Posted 5 years ago #


    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:

    // Include WordPress
    define('WP_USE_THEMES', false);
    <?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; ?>

    If anyone could help me out on how to accomplish the above, i'd be so happy! :)

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 5 years ago #

    <?php the_excerpt(); ?> strips formatting and displays snippet

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

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 5 years ago #

    <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

Topic Closed

This topic has been closed to new replies.

About this Topic