Skip to main content
deleted 47 characters in body
Source Link
psorensen
  • 497
  • 6
  • 17

get_the_title will only retrieve the title of the post you designate. That post data will not carry on to other template tags.

tryEdit: http://codex.wordpress.org/Function_Reference/get_post should help.

<?php query_posts('p=453'); ?>
<?php while (have_posts()) : the_post(); ?>    
 $post_id = 73;
 $queried_post <h4><?php= the_titleget_post(69060);  
?></h4>>
     <<h1><?php the_content();echo $queried_post->post_title; ?>
<<p><?php endwhile;echo $queried_post->post_content; ?>></p>

Credits to Justin Tadlock, via http://wordpress.org/support/topic/how-to-display-a-specific-post-in-a-page-template

get_the_title will only retrieve the title of the post you designate. That post data will not carry on to other template tags.

try:

<?php query_posts('p=453'); ?>
<?php while (have_posts()) : the_post(); ?>
     <h4><?php the_title(); ?></h4>
     <?php the_content(); ?>
<?php endwhile;?>

Credits to Justin Tadlock, via http://wordpress.org/support/topic/how-to-display-a-specific-post-in-a-page-template

get_the_title will only retrieve the title of the post you designate. That post data will not carry on to other template tags.

Edit: http://codex.wordpress.org/Function_Reference/get_post should help.

<?php           
 $post_id = 73;
 $queried_post = get_post(69060); 
?>
<h1><?php echo $queried_post->post_title; ?>
<p><?php echo $queried_post->post_content; ?></p>
Source Link
psorensen
  • 497
  • 6
  • 17

get_the_title will only retrieve the title of the post you designate. That post data will not carry on to other template tags.

try:

<?php query_posts('p=453'); ?>
<?php while (have_posts()) : the_post(); ?>
     <h4><?php the_title(); ?></h4>
     <?php the_content(); ?>
<?php endwhile;?>

Credits to Justin Tadlock, via http://wordpress.org/support/topic/how-to-display-a-specific-post-in-a-page-template