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?

Old Dec 9, 2011, 12:04 PM
New WordPress Fan
141 posts · Jul 2010
What CSS Selector for Category Name Added At Top of Each Category Page?

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!
Old Dec 9, 2011, 12:13 PM
lmilesw's Avatar
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.
Old Dec 9, 2011, 12:27 PM
New WordPress Fan
141 posts · Jul 2010
Hi Larry,

We have tried:

#single_cat_title {
color: #357ec7


h3 + p {
color: #357ec7

Any other ideas?

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

Old Dec 9, 2011, 12:39 PM
juggledad's Avatar
23,713 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 01:17 PM.
Old Dec 9, 2011, 05: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!
Old Dec 9, 2011, 06:07 PM
New WordPress Fan
141 posts · Jul 2010

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!


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 01:37 PM
Category title on category page, not on each post excerpt kicker paulae Excerpts, Read more, Pagination 4 Jun 22, 2009 11:33 AM

All times are GMT -6. The time now is 05:14 AM.

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