Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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?


  #1  
Old Sep 9, 2009, 05:20 PM
chiara7's Avatar
chiara7
 
18 posts · Sep 2009
Budapest - Hungary
[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...)
  #2  
Old Sep 9, 2009, 07: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



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


All times are GMT -6. The time now is 05:59 PM.


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