Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

[SOLVED] Different title color and byline background color for different categories?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Sep 9, 2009, 04:20 PM
chiara7's Avatar
chiara7
 
18 posts · Sep 2009
Budapest - Hungary
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...)
  #2  
Old Sep 9, 2009, 06:01 PM
chiara7's Avatar
chiara7
 
18 posts · Sep 2009
Budapest - Hungary
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.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Categories Count Font Color forthemu Sidebars & Widgets 2 Jul 15, 2009 06:38 AM
[SOLVED] How to get a background image show thru background color juggledad Header configuration & styling 3 Apr 18, 2009 05:03 AM
Fixed width site. Different page background color from body color? blueprairie Forum How-To 1 Mar 20, 2009 08:55 PM
Change color of post title only, not page title jockoe Atahualpa 3 Wordpress theme 1 Feb 26, 2009 06:14 PM
Want to set background-color only under the title of categories widget in the sidebar MarkusM. Sidebars & Widgets 5 Feb 12, 2009 04:45 PM


All times are GMT -6. The time now is 01:25 AM.


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