• Can’t seem to find the problem in my code. Only the post title is showing when I need the post content to display also. Any ideas would be appreciated. Thanks!

    <?php
    
     $querystr = "
        SELECT wposts.*
        FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
        WHERE wposts.ID = wpostmeta.post_id
        AND wposts.post_status = 'publish'
        AND wposts.post_type = 'post'
        AND wpostmeta.meta_key = 'homeonedate'
        AND wpostmeta.meta_value > Curdate()
        ORDER BY wposts.post_date DESC
     ";
     $pageposts = $wpdb->get_results($querystr, OBJECT);
    
    ?>
    
     <?php if ($pageposts): ?>
    
      <?php foreach ($pageposts as $post): ?>
    <?php global $post; ?>
    
        <?php setup_postdata($post_title); ?>
    
     <div class="post" id="post-<?php the_ID(); ?>">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
        <?php the_title(); ?></a></h2>
    
             <div class="entry">
           <?php the_content(__('More...')) ?>
        </div>
         </div>
    
     <?php endforeach; ?>
     <?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; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only title displayed – need to show content’ is closed to new replies.