Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Different title color and byline background color for different categories? (http://forum.bytesforall.com/showthread.php?t=3362)

chiara7 Sep 9, 2009 04:20 PM

[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...:()

chiara7 Sep 9, 2009 06:01 PM

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 10:24 AM.

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