Nov
17

How To Display Single Post Contents In Sidebar Of WordPress Blog?

Hello All,

In order to display single post in wordpress blog sidebar one need to perform below mentioned steps:

1) Write and publish a post.

2) Find out the post’s ID (egg. 143)

3) Open your themes Sidebar.php

4) Include this code:

<?php query_posts(’p=143′); if(have_posts()) : the_post(); ?>

<?php the_content(); ?>

<?php endif; ?>

That’s it!

Thanks,

Shane G.

Popularity: 11% [?]

Leave a Reply

You must be logged in to post a comment.