[SOLVED] Different title color and byline background color for different categories?
Hi! I have in my blog 3 main categories and I would like to give a certain title color and byline background color for each post in a category. (In multiple and single post pages and home page too).
It is possible? (Sorry for my very poor english...:() |
I think, I have the solution - in part.
For the change of the color of the titles: in bfa_post_parts.php after this: function bfa_post_headline($before = '<div class="post-headline">', $after = '</div>') { global $bfa_ata, $post; if ( is_single() OR is_page() ) { $bfa_ata_body_title = get_post_meta($post->ID, 'bfa_ata_body_title', true); $bfa_ata_display_body_title = get_post_meta($post->ID, 'bfa_ata_display_body_title', true); } else { $bfa_ata_body_title_multi = get_post_meta($post->ID, 'bfa_ata_body_title_multi', true); } if ( (!is_single() AND !is_page()) OR $bfa_ata_display_body_title == '' ) { I have made this insert: if (in_category('x')) { $before = '<div class="post-headline1">'; } elseif (in_category('y')) { $before = '<div class="post-headline2">'; } (x,y= category ID) in css.php I defined post-headline1 and post-headline2... and it works. |
All times are GMT -6. The time now is 06:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.