Open Source Scripts > Help with WordPress

Complete noob question

(1/1)

GaryArm:
Hi all, hope you can help me!

I'm trying to learn PHP at the minute, and this has me stumped, any help appreciated!

On a WordPress site, I'm trying to pull a post into a page.  The title is being brought displayed fine, and the expiration date fine - but the text underneath, I have no idea where it's being pulled from.

Please help!

Here is the code:

 <?php /* Start the Loop */
                        //global $query_string;
                        //query_posts( $query_string . '&cat=25&posts_per_page=6' );
                    ?>
                    <?php query_posts( array ( 'cat' => 25));?>
                <?php if (have_posts()) while ( have_posts() ) : the_post(); ?>   
                   
                        <div class="col col_1_3 ">
                            <div class="inner">
                            <h2><?php the_title();?></h2>
                            <p>   <strong><?php //custom
                              $expirationdatets = get_post_meta($post->ID,'expiration-date',true);
                              if($expirationdatets){
                                    $timestamp2 = date("l  jS F    Y", $expirationdatets  );
                                   echo $timestamp2;
                              }
                            ?></strong><br/>
                            <?php if(get_post_meta($post->ID, 'event', true)){?><?php echo get_post_meta($post->ID, 'event', true);}?>
                            </p></div>
                        </div>
                <?php endwhile; else{  _e('Sorry, there are no events to show right now', 'tfuse');} ?>
                    <?php wp_reset_query();?>

GaryArm:
Ok the text below the title is being pulled in from a previous post which has been deleted - how can I change this to pull in text from the same post as the title?

Navigation

[0] Message Index

Go to full version