When an user views a post in your blog,displaying related posts of the same category with some abstracts of the post below that page might increase the number of pageviews you get and also the users interest in your blog.But since there are no plugins that exactly serve this purpose,we can do it manually by a simple trick.
What you get in this trick?
1.Related posts of a particular category is visible below a post.
2.You have control to show related posts on which post and which you never need.
How will you add category related post links below a post page?Follow the below steps
1.Copy the below code and paste it in the custom_function.php
// paste this code into custom_function.php
function custom_cat_page() {
global $post;
$temp_query = $post;
$postID = $post->ID;
$custom_cat = get_post_meta($postID, 'custom_cat_page',$single=true);
if($custom_cat){
?><?php
$posts = new WP_Query('cat='.$custom_cat.'&showposts=10');
while ($posts->have_posts()) : $posts->the_post();
?>
<h3><a href="<?php the_permalink() ?>"><?php echo $post->post_title ?></a></h3>
<?php the_excerpt();
endwhile;
?>
<p><a href="/?cat=<?php echo $custom_cat;?>">View the Archives</a></p>
<?php
$post = $temp_query; }
?>
<?php }
add_action('thesis_hook_after_post','custom_cat_page');
Note:By default we show 10 posts,you can change the number of posts by editing the above code.
2.Now you need the category id of the category which you should show related posts.To do this Go to post and select categories. It will show all the categories. Place your mouse over the category which you want. At the bottom status bar, it will show the category ID.Note the category id you want as we need it in the next step.
3.Now go to the post below which you need to show the related posts and scroll down the page(only in thesis theme) and you will find “add custom field” and click “add new” and create a field name custom_cat_page
and type the category id and save.Publish the post.Now you will see Related posts below the author profile box you see below this post.
Related posts:
- How to add featured posts in custom feature box in thesis wordpress theme
- How to add retweet button into teaser and posts of thesis wordpress theme
- Thesis-how to place ads Above the post title in thesis wordpress theme
- How to hide certain category links in your wordpress blog
- Adding author profile box in thesis wordpress theme
- How to add page navigation in thesis without openhook plugin



