Support » Themes and Templates » Change Link Color

  • Hi,

    I’m trying to change the color of my links in the posts at I am using the Ari theme.

    I don’t want to change the color of the titles or anything like that. The code that I can use to change the color of all the links (not just the ones in the posts) is this:

    a, #content h2 a:hover{

    But I just want to change the color of the links inside the text. What code can I use?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Standard CSS for link colour (only) would be

    a {
        color: #FF0000;

    Of course, the value of #FF0000 would be whatever colour you want to change it to.

    I don’t want to change all the links, I just want to change the links in the post. I don’t want to change the post permalinks, the links in the sidebar, etc. Just the ones in the post.

    Ok, then put the main elements class in front of it. Easy done.

    .hrecipe a {

    That changes every <a> element inside any element that has a class of hrecipe.


    you have to go in your wp-admin:
    wp-admin> Appearance> theme options >edit the color in Second Link Color.

    The second link colour changes the colour of the sidebar widgets. I’m going to try what you said Michael – gimmie a minute.

    That works great. Thanks!

    Actually – not all of my posts have the hrecipe div around them. How can I make this work whether or not it’s there?

    Figure out what you have as a common container element, and use that.

    <div id="forlinks">
    	<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and 
    search. ?>
    			<?php the_excerpt(); ?>
    			<p class="meta"><span><a href="<?php the_permalink(); ?>">
    	<?php else : ?>
    			</div><?php the_content( __('Read more >>', 'ari' ) ); ?>

    Ok see that div? If I place it there, then the links don’t underline at all in the loop. If I put the closer after the line it is at now, it underlines the read more. I don’t want it to underline the read more. Where do I put the div?

    ok, you put this code in your style.css of your theme.

    .meta a:hover{
    color: #565656 !important; <– here change color

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change Link Color’ is closed to new replies.