Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Forum How-To (http://forum.bytesforall.com/forumdisplay.php?f=9)
-   -   What CSS Selector for Category Name Added At Top of Each Category Page? (http://forum.bytesforall.com/showthread.php?t=16213)

New WordPress Fan Dec 9, 2011 12:04 PM

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!

lmilesw Dec 9, 2011 12:13 PM

What have you tried?
Do you have a link to the site?
Did you try adding !important in your CSS?

New WordPress Fan Dec 9, 2011 12:27 PM

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!

juggledad Dec 9, 2011 12:39 PM

change the '<h3>' to '<h3 class="single_cat_title">' and then use that as the class identifier

New WordPress Fan Dec 9, 2011 05:39 PM

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!

New WordPress Fan Dec 9, 2011 06:07 PM

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!

juggledad Dec 9, 2011 06:15 PM

yup. but no space betweenteh h3 and the .single_cat_title so it should be
h3.single_cat_title {
color: #357ec7;
}


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

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