Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » Running WordPress » Installing & running WordPress »

Getting rid of the rel="nofollow" thing in articles (not comments), how?


  #1  
Old Jun 22, 2009, 01:05 PM
MarkusM.
 
10 posts · Feb 2009
Hi there,

The whole evening I'm searching and trying different plugins in order to get rid of the automatically inserted nofollow-thingy in WP.
I tried "nofollow case by case", "dofollow" and "follow URL".

But none of the plugins workes in the way I need. I need to remove the tag from links in articles.
That the tags are automatically removed in comments, that may be ok for the first time.

Do anyone of you know a plugin that removes the nofollow-tag out of written articles ?

Thanks in advance,
Markus
  #2  
Old Jun 22, 2009, 03:48 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You shouldn't have rel=nofollow in post content. A plugin might be causing this

But regardless, the following code would remove rel=nofollow from all post content. Add it at the bottom of functions.php, before the last closing ?> tag:

PHP Code:
add_filter("the_content""remove_nofollow");
function 
remove_nofollow($string) {
    
$string str_ireplace(' rel="nofollow"'''$string);
    return 
$string;

To remove rel=nofollow from comment text as well, also add:

PHP Code:
add_filter("comment_text""remove_nofollow"); 
  #3  
Old Jun 23, 2009, 01:05 AM
MarkusM.
 
10 posts · Feb 2009
Hi Flynn, thanks for your reply.
I set up a new WP installation for testing reasons with the same effekt.
New installation, new database, no plugins, nothing.
But rel=nofollow is coming up as default in the article content

Now I'm trying your code-appendix. Thanks for that.
But none of the files, I tried the code with, worked.
I tried your piece in :
- wp-includes/functions.php
- wp-content/themes/classic/functions.php
- wp-content/themes/default/functions.php

When I inserted your code in the first mentioned functions, I'm only getting a white page, in the other cases nothing happens (site appears, but with nofollow acitvated).

Regards
Markus

Last edited by MarkusM.; Jun 23, 2009 at 01:13 AM.
  #4  
Old Jun 23, 2009, 06:30 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You should put it into Atahualpa's functions.php
  #5  
Old Jun 26, 2009, 01:35 PM
fromtheranks
 
149 posts · Apr 2009
Dev Env't: XP Pro SP3, IIS 5.1, MySQL 5.1, PHP 5.2.x, WP 2.7.1, Atahualpa 3.3.3, IE 7, FF 3.0.x
Hi,

As an add-on to Flynn's remarks (and I'm not aware of WP setting "nofollow" as a default either), there are a couple of SEO plugins that will allow you to control the follow / nofollow status of posts and pages.

I am using, and learning, HeadSpace2 which, among other things, allows you to set up a default for posts and pages at a global level (ex: you can set nofollow for category and archive pages) but with the ability to do overrides on an individual post or page.

Another is All In One SEO, which is simpler to work with but doesn't have the granularity of control (which might not be a bad thing as HS2 has a fairly steep learning curve).

Hope this helps.
  #6  
Old Apr 25, 2010, 10:20 AM
kboode
 
7 posts · Jan 2010
I have been using a plugin to remove the nofollow tag from my comments section for quite a while. I believe that it has worked in the past.
Today I checked again and to my surprise all comments have the rel=nofollow tag. This despite the plugin. I downloaded a few other plugins with similar workings to the one I had been using, but the nofollow continues to show.
Then I searched in the forum here and found this thread. I added the suggested lines of code to functions. php with the Atahualpa theme, but no matter what I do the no follow remains.
Is this an issue with the latest wordpress version? Or am I doing something wrong?

I am using wordpress 2.9.2., atahualpa 3.4, my comment system is Disqus and my blog is at http://automarker.net/blog/
  #7  
Old Apr 25, 2010, 04:06 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
have you checked to see if Disqus is adding that in?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to remove "comments are closed" from the end of posts wylde1der Post-Kicker, -Byline & -Footer 3 Dec 14, 2009 05:45 AM
Comments on "Page" pages bug ricky119 Comments, trackbacks & pings 6 Jul 22, 2009 04:39 PM
Can I get rid of the word "Home" below menu bar on the home page? nasu Page & Category Menu Bars 1 Jun 30, 2009 02:36 PM
Spaces in the fields of "Post comments" form Lucker Comments, trackbacks & pings 1 May 25, 2009 12:38 PM
How to style "post icon" and "post comments" text Whatsthatcat? RSS, Feeds & Subscribing 3 Apr 1, 2009 09:41 AM


All times are GMT -6. The time now is 11:06 AM.


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