Other posts in category
-
Is there any possibility to see other posts in same category as a section in the sidebar?
För example, if I’m reading a post in the category “about”, I want to be able to see other posts from the same category in the sidebar.
-
Thank’s but not really what I was looking for. With that one you get other posts in the same category on the bottom ov every post.
on the bottom ov every post.
Says who?Click on my name and watch the sidebar while looking at a single post…
I tried using that plugin but I could never get it to work like I wanted it. Altough I relly appreciate the fast reply!
Does anybody have any other tips? Maybe some ideas how to get http://www.dagondesign.com/articles/other-posts-from-cat-plugin-for-wordpress/ working like I need it?
I’ve used the ‘other posts from cat’ plugin a few times before and it works really well.
I’ve only just noticed that it doesn’t seem to be working in 2.6 though, or is it just me?
Anyone got an idea of how to make it work?
Ok, I couldn’t get the plugin to work in 2.6, but when I thought about it, I didn’t really need all of the functions of the plugin anyway.
All I want to do is to display a very simple list of the links to the other posts in the same category.
This code works perfectly for me, you can see it on any single post on http://johnonfood.com and I think it is also what the OP is looking for.
<?php global $post; $categories = get_the_category(); $category = $categories[0]; $cat_ID = $category->cat_ID; $myposts = get_posts("numberposts=20&category=$cat_ID"); ?> <?php foreach($myposts as $post) :?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php endforeach; ?>
Thank you JohnPope. That’s what i was looking for.
- The topic ‘Other posts in category’ is closed to new replies.