View Full Version : Remove underscore from link in post

04-19-2012, 11:33 AM
OK, here's one that I just know does not have a simple solution because I've been to the WP forum and I think it's all about internal code which is all Greek to me.

For SEO purposes, I want to remove the underscore on certain links in posts and on pages. WP simply does not allow it. No matter that I delete the "decoration: underline" code from the link, it still appears.

I don't want the underscore deleted from all links -- only certain ones. Does anyone have a simple solution? Can a feature be built into Socrates that will take care of this? If it means going into the template code to make a change, could somebody do this for me?

This is driving me crazy.


Dan Nickerson
04-19-2012, 10:33 PM
Wordpress uses hypens, not underscores.

So you're basically saying that your in your post content you've manually added links to outside sites that use underscores?

Can you share an example of one of your underscore links?

This has nothing to do with the theme that I can imagine. Really need to see what you're talking about to give a definitive answer.

04-20-2012, 07:50 AM
I should have said "underline" not "underscore" -- ___________ compared to _ _ _ _ _ _ _. And you're right, this is not a Socrates problem; it's a WordPress problem. Most clickable links are underlined but by eliminating the decoration designation from the code, the underline can be removed, but not in WP. When doing on-page SEO, there are links that you really don't want people to click on so you disguise them which includes eliminating the underline. In WP, I can't find a way to remove the underline from a link. WP puts it in automatically and no matter what you do, it still appears. If you have to remove some code in the style sheets for this to happen, that is something I am very uncomfortable with. I hope this is a better explanation.

Dan Nickerson
04-20-2012, 10:30 AM
You just need to add this to css

a:link {text-decoration: none;} /* unvisited link */
a:visited {text-decoration: none;} /* visited link */
a:hover {text-decoration: none;} /* mouse over link */
a:active {text-decoration: none;} /* selected link */

04-20-2012, 10:45 AM
Therein lies the problem. I have no idea where in the world to put it. Once it gets down to adding or deleting code, I'm completely lost.

04-20-2012, 11:26 AM
You can put it in the Socrates Styling page CSS box

04-20-2012, 11:49 AM
Is this something new that was added to Socrates? I'm not sure which version of the template I currently am using on my site, but iunder the styling tab it doesn't seem to have any place to paste the code.

04-20-2012, 12:03 PM
It has been there for the last couple of revisions. If you have an older version you would need to use the appearance editor and add it to the end of the CSS file.

04-20-2012, 12:08 PM
If you could please tell me exactly where to add it on the CSS file I would appreciate it. At some point I will update Socrates, but right now I'm in a rush.


04-20-2012, 01:08 PM
In your dashboard under Appearance > Editor. It should open up to style.css. Scroll to the bottom, add the lines and click on Update.