Err, what’s the question? What’s not working?
And hey, have you seen Category_Templates yet?
When I tried the above code there was error
Other possible way, it worked,
I tried to recall the code as per
http://codex.wordpress.org/Template_Tags/in_category
<?php if ( in_category(”) ): ?>
// PHP or HTML Code
<?php endif; ?>
Got Some Error in PHP Code
<?php if ( in_category(1) || in_category (3) || in_category (5) ) {
echo ‘<center>HTML Code 1</center>’;
} else {
echo ‘<center>HTML Code 2</center>’;
}
?>
Parse error: syntax error, unexpected T_LNUMBER, expecting ‘,’ or ‘;’ in //public_html/wp-content/themes/default/l_sidebar1.php on line 43
IF I use like below one : No Error
<?php if ( in_category(‘1’) || in_category(‘3’) || in_category(‘5’) ): ?>
<center>HTML Code 1</center>
<?php endif; ?>
<center>HTML Code 2</center>
Please anyone correct the Code …