thats great thank you madjax..
Madjax,
Do you know how I would tell wordpress the following:
Display normal category layout, unless on certain category, eg: video, then deliver a different layout, eg: thumbnails only..
This will be contained in the category loop, any examples would be great. I am not an expert php coder.
Thank you!
J
Use conditions like
if (in_category(‘video’)) :
//put the code here for video according your design.
else
//put the code here according your design.
endif;
Many thanks Chinmoy!
I’m not sure my code is correct – coul you just check my code, in particular the PHP syntax:
// The Category Loop
function thematic_category_loop() {
while (have_posts()) : the_post(); ?>
<?php if(in_category('17') ) : ?>
<!-- layout #1 -->
<?php if( in_category( array( 19,20 ) ) : ?>
<!-- layout #2 -->
<?php else : ?>
<!-- default layout -->
<?php endif; ?>
Many thanks,
Jim C
// The Category Loop
function thematic_category_loop() {
while (have_posts()) : the_post(); ?>
<?php if(in_category('17') ) : ?>
<!-- layout #1 -->
<?php elseif( in_category( array( 19,20 ) ) : ?>
<!-- layout #2 -->
<?php else : ?>
<!-- default layout -->
<?php endif; ?>
}?>