Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Category with only one post as single (http://forum.bytesforall.com/showthread.php?t=12708)

tom10 Feb 9, 2011 03:52 AM

Category with only one post as single
 
Hey,

some of my categories have one post only.
How could it be achieved that such categories show these articles in the single-post style with its comments?

Thanks for your answers!

juggledad Feb 9, 2011 04:19 AM

if you are saying that you want to display categories so that
1) if there is only one post in the category, you display the full post and comments
2) if there are more than one post in the category, display them all as either full posts or excerpts without comments

You are going to have to (1) look for a plugin that will do this or (2) dig into the code and add the logic that would do this.

Let us know what you come up with so other users can gain by your answer.

tom10 Feb 9, 2011 05:16 AM

This is exactly the way I want to display the posts.
I couldnīt find a plugin, yet. Maybe someone else knows?!

tom10 Feb 9, 2011 01:26 PM

Found this http://forum.wordpress-deutschland.o...kategorie.html

Quote:

<?php
/**
***@package*WordPress
***@subpackage*Default_Theme
**/
if(is_category()*&&*($wp_query->post_count)==1)*:
include*(TEMPLATEPATH*.*'/single.php');*
else:*
get_header();
?>
But i don't Know how to add it in this theme.

juggledad Feb 9, 2011 06:44 PM

1) that thread looks to be in german
2) atahualpa does not have a 'single.php'

rajeshjsl Mar 2, 2011 02:07 AM

any idead how to do this , me too want this ..


All times are GMT -6. The time now is 08:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.