/ Published in: PHP
You need to replace $post_id with the ID of the page you want to display. If you want a thumbnail displayed (like the other posts), then assigned a Featured Image to the page just as you would with regular posts.
Expand |
Embed | Plain Text
<div class="single-page"> <?php $post_id = 145; $queried_post = get_post($post_id); ?> <h3 style="color:#333;font-size:20px;text-transform:uppercase;margin-bottom:10px;"><?php echo $queried_post->post_title; ?></h3> <div class="meta"> <p class="feat-post-details">Posted by <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y') ?> in <?php the_category(', ') ?> | <a class="comments" href="<?php comments_link(); ?> "><?php comments_number('No Comments', '1 Comment', '% Comments'); ?></a></p> </div> <?php if ( has_post_thumbnail() ) { ?> <?php $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large'); ?> <a href="<?php the_permalink() ?>"><img class="home-thumbnail" src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $thumbnail[0]; ?>&h=170&w=170&zc=1" alt="" /></a> <?php } ?> </div> <!-- end .single-page -->
You need to login to post a comment.
