Conditional based on amount of post in cat
-
I am building a featured content gallery in my template which will be generated by a category like ‘slideshow-1’.
I want to set up a conditional statement so in the case that I only have one post in the ‘slideshow-1’ category the template will then load just the featured image styled to look like a static version of the slider instead of the actual slider.
something like
if ( cat=’slideshow-1′ has more than one post){
// show slider
}
else (cat=’slideshow-1′ has only one post) {
// show static featured image and title excerpt.
}My question is there a conditional for ‘more than 1 post in cat’ or ‘ ‘just one1 post in cat’?
thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Conditional based on amount of post in cat’ is closed to new replies.