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 » Forum Usage » Forum How-To »

What CSS Selector for Category Name Added At Top of Each Category Page?


  #1  
Old Dec 9, 2011, 01:04 PM
New WordPress Fan
 
141 posts · Jul 2010
The discussion on how to put the category name at top of a category page, found at http://forum.bytesforall.com/showthread.php?t=2101 , was very helpful. Following these instructions, we successfully made the Category name show at the top of each Category Page.

However, I have not been able to find the right CSS selector to change the color of the Category Name <h3> headings as they appear at top of the Category pages.

Help would be much appreciated!

Many thanks!
  #2  
Old Dec 9, 2011, 01:13 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
What have you tried?
Do you have a link to the site?
Did you try adding !important in your CSS?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Dec 9, 2011, 01:27 PM
New WordPress Fan
 
141 posts · Jul 2010
Hi Larry,

We have tried:

#single_cat_title {
color: #357ec7
}

and

h3 + p {
color: #357ec7
}

Any other ideas?

I will send you a message with a link to our site.

Thanks!
  #4  
Old Dec 9, 2011, 01:39 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
change the '<h3>' to '<h3 class="single_cat_title">' and then use that as the class identifier
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Dec 9, 2011 at 02:17 PM.
  #5  
Old Dec 9, 2011, 06:39 PM
New WordPress Fan
 
141 posts · Jul 2010
Thank you for the reply, Juggledad. Just to be sure I understand: Do you mean to change the code I added in index.php, after <?php get_header(); ?>, so that

rather than
<?php if ( is_category() ) {?><h3><?php single_cat_title(''); ?></h3><?php } ?>

it will read as follows:

<?php if ( is_category() ) {?><h3><?php single_cat_title(''); ?><h3 class="single_cat_title"><?php } ?>

Then enter a CSS insert as follows:

.single_cat_title {
color: #357ec7;
}

Is that what you meant? Just want to be sure I have it right before implementing.

Many thanks!
  #6  
Old Dec 9, 2011, 07:07 PM
New WordPress Fan
 
141 posts · Jul 2010
Oops!

The code should rather be:

<?php if ( is_category() ) {?><h3 class="single_cat_title"><?php single_cat_title(''); ?></h3><?php } ?>

Is that correct? Would that work with a CSS selector as follows:

h3 .single_cat_title {
color: #357ec7;
}

Meanwhile, I just changed all h3 headers to that color as follows:

h3 {color: #357ec7;}

But, would rather use CSS to specifically select the Category page titles. Would the above do it?

Many thanks!
  #7  
Old Dec 9, 2011, 07:15 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
yup. but no space betweenteh h3 and the .single_cat_title so it should be
h3.single_cat_title {
color: #357ec7;
}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Tags
category page headings

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I highlight active category on a combined page & category menu bar? samij0 Page & Category Menu Bars 0 Mar 11, 2010 02:37 PM
Category title on category page, not on each post excerpt kicker paulae Excerpts, Read more, Pagination 4 Jun 22, 2009 12:33 PM


All times are GMT -6. The time now is 11:49 PM.


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