Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Different logos for each category along


  #1  
Old Sep 21, 2009, 05:56 PM
speedywap
 
4 posts · Sep 2009
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.
  #2  
Old Sep 25, 2009, 01:37 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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); }

Last edited by Flynn; Sep 27, 2009 at 11:58 PM. Reason: Changed <h1 id="blogtitle"> to <h1 class="blogtitle">
  #3  
Old Sep 27, 2009, 09:44 AM
drongo
 
27 posts · Sep 2009
Didn't work for me. I had to write
<h1 class="blogtitle">...
instead of
<h1 id="blogtitle">...

Greetings, Drongo
  #4  
Old Sep 27, 2009, 10:11 AM
drongo
 
27 posts · Sep 2009
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
  #5  
Old Sep 28, 2009, 12:18 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Quote:
Originally Posted by drongo
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'); 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
showing child category menus when selected the parent category mlluch Page & Category Menu Bars 6 Apr 27, 2011 01:12 PM
Changing category order in category menu bar, not in sidebar cat. list paulae Page & Category Menu Bars 13 Mar 30, 2011 05:36 PM
"About" row, footer links, sidebar background, logos in a line ctenos Header configuration & styling 1 Jul 28, 2009 01:21 PM
Page Specific Logos drewpasmith Header configuration & styling 15 May 12, 2009 06:45 AM
Logos in Footer Steve_T Atahualpa 3 Wordpress theme 2 Feb 22, 2009 05:18 AM


All times are GMT -6. The time now is 03:43 AM.


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