WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] including news (2 posts)

  1. tracey12
    Member
    Posted 6 years ago #

    I have a site, which is not currently using WP. I'm planning to convert it t WP, and I tried to include some news in the template but its not showing up right. It's only showing the title, and not the body of the news, when I know the news items have a body (I imported them from Cutenews). Here's the code I used to show the news: Anyone spot anything wrong?`<?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
    <small><b><font color="#404040"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small></b></font>

    <div>
    <?php the_content('Read the rest of this entry »'); ?>
    </div>

    <p>Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

    <?php endwhile; ?>

    <div>
    <div><?php next_posts_link('« Previous Entries') ?></div>
    <div><?php previous_posts_link('Next Entries »') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>`

  2. tracey12
    Member
    Posted 6 years ago #

    I solved the issue. It seems like for some reason WP included the news, but just insert it between comment tags <!--- ---> and thats why it wouldn't show.

Topic Closed

This topic has been closed to new replies.

About this Topic