how can i change the color of the link in my post??
also, how can i make that link open in a new window?
how can i change the color of the link in my post??
also, how can i make that link open in a new window?
Changing the color of a link is done via your CSS style sheet.
There are several ways to make links open in new windows. I just wrote a tutorial on my blog about using jQuery to open external links in a new window. You can check it out here if you'd like.
where in the style sheet
that link you gave me is way too confusing
where is the help???
In your style sheet look for a:link, a:visited, a:hover, a:active.
As for the tutorial, it takes you step by step and explains everything.
If you'd rather just hack the links to get them to open in a new window and don't care about being standards-compliant, then you can just add target="_blank" to your links like so:
<a href="url_of_link" target="_blank" title="title of link">link text</a>
for the color change,where do i find the info to edit??
you said a:link, a:visited, a:hover, a:active???
i dont see anything like this in the content area
here is my blog
jvazjrsblog.com
You have to look in your CSS stylesheet; your style.css file. Your links are currently set to:
a {
color: #727248;
text-decoration: none;
}
a:hover {
color: #727248;
text-decoration: underline;
}
In your WP Dashboard left navigation menu open the built-in file editor (Appearance » Editor) and choose your CSS stylesheet to edit. Scroll until you see the code I typed above and change the color to whatever you want.
change it for both?
this will only change the links in the posts right?
No, it will change all links because you don't have links within posts styled separately from other links. If you only want links within the post content to be changed then you need to add the following to your stylesheet:
.postContent a {
color: #whatever color you want;
text-decoration: none;
}
.postContent a:hover {
color: #whatever color you want;
text-decoration: underline;
}add both correct??
where do i add them?
In your WP Dashboard left navigation menu open the built-in file editor (Appearance ยป Editor) and choose your CSS stylesheet to edit.
i know that part
where do i add that code in the style sheet?
well?
can anyone else help me??
.postContent a {
color: #whatever color you want;
text-decoration: none;
}
.postContent a:hover {
color: #whatever color you want;
text-decoration: underline;
}
This didn't work when I tried it :(
@Nowhere Man:
chances are that your theme uses a different css class for the post.
theme?
link?
try to look into index.php or single.php of your theme, and see if you can identify the class of your post area - something vaguely similar to
<div class="entry"> <?php the_content(); ?> </div>
where you might find the class you are looking for in place of 'entry' in the above example.
Thanks, alchymyth,
My theme is K2. I'm trying to change the color of my post's links.
When I look in index.php I see:
<?php get_header(); ?>
<div class="content">
<div id="primary-wrapper">
<div id="primary">
<div id="notices"></div>
<?php /* K2 Hook */ do_action('template_primary_begin'); ?>
<?php if ( '1' == get_option('k2rollingarchives') ): ?>
<div id="dynamic-content">
If there was a color code I would know what to do. But this is all I see. In single.php it's the same.
Any suggestion as to what to specifically change? Thanks!
In the style.css file, look for this section:
a {
color: #27d;
text-decoration: none;
}
On an unedited style.css from K2 1.0.3, those are lines 1035 - 1038. Just change the "color" attribute.
Thanks, Macmanx, but I tried that and it doesn't work. That's the color of my links on the sidebar. [My editor doesn't show lines, of course] I'm just trying to change the link colors that apear on the posts. It's a horrible red color.
If you're talking about http://venicebeachartists.com/ the links are only red after they have been visited. They're blue just like the sidebar links if they are unvisited. To change the visited links color, look for this section:
.entry-content a:visited {
color: #b41;
}
On an unedited style.css from K2 1.0.3, those are lines 1040 - 1042. Just change the "color" attribute.
Thank you, macmanx, it works great!
You're welcome!
This topic has been closed to new replies.