Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Different logos for each category along (http://forum.bytesforall.com/showthread.php?t=3552)

speedywap Sep 21, 2009 05:56 PM

Different logos for each category along
 
Is it possible to have different logos for each category.

After that, is it possible to have different colour customization of teh category.

My site is http://speedywap.com/

Help will appreciated.

Flynn Sep 25, 2009 01:37 PM

You could do this through the CSS class of the body tag. Look into the source code of various pages throughout your site to see the classes that the body tag gets

<body class="archive category category-atahualpa-wordpress-themes logged-in">

Then you'd put custom CSS code into Atahualpe Theme Options -> HTML/CSS Inserts -> CSS Insert, to address each category page separately:

body.category-atahualpa-wordpress-themes other-selector { property: value; }
body.category-other-category-name other-selector { property: other-value; }
body.category-third-category-name other-selector { property: third-value; }

To be able to change an image remotely through CSS you should use a background image. The logo is not a background image. You could remove that the whole logo area (which contains the logo) and build your own logo area by editing Atahualpa Theme Options -> Style & edit HEADER AREA -> Configure Header Area

1) Remove %logo
2) Build the whole custom logo area with HTML and/or PHP right inside this text area, i.e.

%pages
<h1 class="blogtitle">My blogtitle</h1>
%bar1 %image %bar2

CSS Insert

h1.blogtitle {padding-left:100px;display:block;height:50px;background: url(/path/to/default/image.gif) no-repeat scroll left top;}
body.category-atahualpa-wordpress-themes h1.blogtitle { background-image: url(/path/to/other/image.gif); }
body.category-other-category-name h1.blogtitle { background-image: url(/path/to/other/image2.gif); }
body.category-third-category-name h1.blogtitle { background-image: url(/path/to/other/image3.gif); }

drongo Sep 27, 2009 09:44 AM

Didn't work for me. I had to write
<h1 class="blogtitle">...
instead of
<h1 id="blogtitle">...

Greetings, Drongo

drongo Sep 27, 2009 10:11 AM

When I add this CSS:
body.category-kino h1.blogtitle { background-image: url(/wordpress/wp-content/themes/atahualpa/images/header/headimage03.jpg); }
I get this image in the category-view of the category "kino". Thats fine. But how can I get it in every article which is in this category?
In a single post the body looks like this: <body class="single postid-41 logged-in">
I don't want to adress every single post :-). Is is possible to ask for the category-attribute inside a post?

Greetings,
Drongo

Flynn Sep 28, 2009 12:18 AM

Quote:

Originally Posted by drongo (Post 15439)
Didn't work for me. I had to write
<h1 class="blogtitle">...
instead of
<h1 id="blogtitle">...

Greetings, Drongo

I fixed the post above.

Quote:

Is is possible to ask for the category-attribute inside a post?
At the bottom of functions.php add:
PHP Code:

function add_cats_to_body_class($classes='') {
    if (
is_single()) {
        global 
$post;
        
$categories get_the_category($post->ID);
        foreach (
$categories as $category) {
            
$classes[] = 'in-cat-' $category->category_nicename;
        }
    }
    return 
$classes;
}
add_filter('body_class''add_cats_to_body_class'); 



All times are GMT -6. The time now is 06:52 PM.

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