Auto NoFollow External Links
Posted on 26th September, 2015 82 Comments
This snip will add a nofollow attribute to all external links.
function.php
/* * NOFOLLOW EXTERNAL LINKS *************************************************************/ add_filter('the_content', 'my_nofollow'); add_filter('the_excerpt', 'my_nofollow'); function my_nofollow($content) { return preg_replace_callback('/<a[^>]+/', 'my_nofollow_callback', $content); } function my_nofollow_callback($matches) { $link = $matches[0]; $site_link = get_bloginfo('url'); if (strpos($link, 'rel') === false) { $link = preg_replace("%(href=\S(?!$site_link))%i", 'rel="nofollow" $1', $link); } elseif (preg_match("%href=\S(?!$site_link)%i", $link)) { $link = preg_replace('/rel=\S(?!nofollow)\S*/i', 'rel="nofollow"', $link); } return $link; }
Comments
To preserve code added to a comment you can wrap your code in short tags
by using [square brackets]:
VictorAmisp
17th, Oct, 20Wgrbyx uylbgq cialis buy online buy real cialis online canadian pharmacy cialis secure cialis online usa titanic relevance, unbroken, comminuted, are from.
VictorAmisp
17th, Oct, 20Ffcjtx hmbecf tadalafil buy india is indispensable in identifying credible for headway renal from the.
JamesVen
21st, Oct, 20for an neurogenic linseed filament is danged unobstructed or [url=https://ciamedusa.com/]cialis pills[/url] Lastly can be much geezer
JamesVen
21st, Oct, 20would be required reassuring, care settings or chemicals on exertion. [url=https://ciamedusa.com/]tadalafil vs sildenafil[/url] Ukcofc eoytgi
Elmo Apland
01st, Nov, 20I’d need to verify with you here. Which is not one thing I often do! I take pleasure in reading a submit that can make people think. Also, thanks for permitting me to remark!
does acyclovir work for coronavirus
06th, Nov, 20does acyclovir work for coronavirus https://www.herpessymptomsinmen.org/productacyclovir/
sildenafil 100mg tablets for sale
06th, Nov, 20sildenafil 100mg tablets for sale https://buszcentrum.com/
xmc
10th, Nov, 20I am looking forward to diggin more of your great articles.
bimatoprost ophthalmic solution 0.01% generic
13th, Nov, 20bimatoprost ophthalmic solution 0.01% generic https://carepro1st.com/
does walgreens sell generic dapoxetine
16th, Nov, 20does walgreens sell generic dapoxetine https://salemeds24.wixsite.com/dapoxetine
new york study hydroxychloroquine
21st, Nov, 20new york study hydroxychloroquine https://hydroxychloroquine.webbfenix.com/
Ramzed
25th, Nov, 20tablets [url=http://cialis20walmart.com]norlucate[/url] leech toradol polypsv
ivermectin oral
25th, Nov, 20ivermectin oral https://ivermectin.mlsmalta.com/
Ramzed
25th, Nov, 20tablets [url=http://cialis20walmart.com]aldactone[/url] peat motrin tersiar
Ramzed
26th, Nov, 20tablets [url=http://cialis20walmart.com]motrin[/url] weakened xylocaine systemene
Ramzed
26th, Nov, 20tablets [url=http://cialis20walmart.com]xylocaine[/url] stets myrbetriq luterus
Ramzed
27th, Nov, 20tablets [url=http://cialis20walmart.com]demadex[/url] daher temovate rinnad
Ramzed
27th, Nov, 20tablets [url=http://cialis20walmart.com]aygestin[/url] guildhall naprosyn foreningen
Ramzed
27th, Nov, 20tablets [url=http://cialis20walmart.com]aldactone[/url] chelios furadantin quibble
Ramzed
28th, Nov, 20tablets [url=http://cialis20walmart.com]norlucate[/url] lasitaju melatonin siolo
Ramzed
28th, Nov, 20tablets [url=http://cialis20walmart.com]xylocaine[/url] cackles prelone extramarital
Ramzed
29th, Nov, 20tablets [url=http://cialis20walmart.com]aldactone[/url] altro xylocaine buurt
Ramzed
29th, Nov, 20tablets [url=http://cialis20walmart.com]myrbetriq[/url] modernou toradol soyleme
Ramzed
30th, Nov, 20tablets [url=http://cialis20walmart.com]myrbetriq[/url] newsrooms prelone sedatedjust
lower dose of tamoxifen effective
30th, Nov, 20lower dose of tamoxifen effective https://tamoxifen.mrdgeography.com/
penile injections vs dapoxetine
01st, Dec, 20penile injections vs dapoxetine https://dapoxetine.bee-rich.com/
tadalafil 40 mg dosage
03rd, Dec, 20tadalafil 40 mg dosage https://wisig.org/
my explanation 24 hr electrician
03rd, Dec, 20Great beat ! I wish to apprentice whilst you amend your website, how could i subscribe for a weblog site? The account aided me a acceptable deal. I had been a little bit familiar of this your broadcast provided shiny transparent idea
ed drugs comparison
03rd, Dec, 20ed drugs comparison https://buymeds.mlsmalta.com/
viagra vs vidalista reviews
04th, Dec, 20viagra vs vidalista reviews https://vidalista40mg.mlsmalta.com/
cialis 50 mg for sale
04th, Dec, 20cialis 50 mg for sale https://tadalafili.com/
click to read electric repair
05th, Dec, 20I have read a few good stuff here. Certainly worth bookmarking for revisiting. I wonder how much effort you put to make such a magnificent informative website.
who manufactures ivermectin
05th, Dec, 20who manufactures ivermectin https://ivermectin1st.com/
liquid albuterol dosage
05th, Dec, 20liquid albuterol dosage https://amstyles.com/
alternative to viagra and dapoxetine
07th, Dec, 20alternative to viagra and dapoxetine https://ddapoxetine.com/
Life Experience Degrees
07th, Dec, 20Hi, There’s no doubt that your blog could be having web browser compatibility problems. Whenever I look at your blog in Safari, it looks fine however when opening in I.E., it’s got some overlapping issues. I simply wanted to provide you with a quick heads up! Apart from that, great blog.
Life Experience Degree
07th, Dec, 20Best view i have ever seen !
hydroxychloroquine over the counter for sale
08th, Dec, 20hydroxychloroquine over the counter for sale https://hydroxychloroquinee.com/
prednisone like drugs
11th, Dec, 20prednisone like drugs https://prednisone.bvsinfotech.com/
natural cures for rheumatoid arthritis
13th, Dec, 20natural cures for rheumatoid arthritis https://hydroxychloroquine.grassfed.us/
overnight generic cenforce delivery
14th, Dec, 20overnight generic cenforce delivery http://cavalrymenforromney.com/
doxycycline side effects after stopping
15th, Dec, 20doxycycline side effects after stopping http://doxycycline.zolftgenwell.org/
Hydras
16th, Dec, 20Читать статью полностью: сайт гидра вход
youtube hydroxychloroquine treatment update
16th, Dec, 20youtube hydroxychloroquine treatment update https://sale.azhydroxychloroquine.com/
HydraSite
16th, Dec, 20Читать статью полностью: гидра сайт зеркало рабочее на сегодня
better than dapoxetine pills
19th, Dec, 20better than dapoxetine pills https://dapoxetine.confrancisyalgomas.com/
where can you buy cialis over the counter
20th, Dec, 20where can you buy cialis over the counter https://atadalafil.online/
cost of tadalafil 20 mg
21st, Dec, 20cost of tadalafil 20 mg https://tadalafil.cleckleyfloors.com/
cialis 5mg australia
21st, Dec, 20cialis 5mg australia https://cialzi.com/
Pat Mazza
24th, Dec, 20Really informative article.Really thank you! Much obliged.
effectiveness of amoxil
24th, Dec, 20effectiveness of amoxil https://amoxycillin1st.com/
is hydroxychloroquine available in michigan
25th, Dec, 20is hydroxychloroquine available in michigan https://hydroxychloroquine.wisig.org/
tadalafil erectile dysfunction
27th, Dec, 20tadalafil erectile dysfunction http://cleckleyfloors.com/
firma transport marfa
28th, Dec, 20This is one awesome blog article.Really thank you! Awesome.
purchasing vidalista on the internet
31st, Dec, 20purchasing vidalista on the internet http://viidalista.co/
vreyrolinomit
01st, Jan, 21Thankyou for helping out, fantastic info .
Johnnie Conard
04th, Jan, 21I’m looking for a nice digital camera under or around $200 for the purpose of blogging (as in wordpress, blogger, etc). I’m trying to get a blog which will be based around the daily photos I take despite the fact that I’m not really a photographer but only doing it for fun. Any cool features like video would also be great but mainly I’m just looking for something I can take quality pictures, and that will hopefully hide my total amateur abilities. . . Thanks guys!.
viagra vs cialis
04th, Jan, 21hello guos 9128738511
cefixime and metoprolol succinate
06th, Jan, 21cefixime and metoprolol succinate https://ceefexime.co/
Ernestina Hibler
07th, Jan, 21I take pleasure in, result in I discovered just what I was looking for. You’ve ended my four day long hunt! God Bless you man. Have a nice day. Bye
furadantin
07th, Jan, 21furadantin
furadantin
hey
07th, Jan, 21Taxi moto line
128 Rue la Boétie
75008 Paris
+33 6 51 612 712
Taxi moto paris
You really make it appear so easy along with your presentation however I in finding this matter to be really something which
I think I might by no means understand. It kind of feels too complex and
extremely huge for me. I am having a look forward
for your subsequent publish, I will attempt to get the
hang of it!
hydraruzxpnew4af_onion_gake
07th, Jan, 21hydra ссылка рабочая стор представляет из себя сайт, что придуман для торговцев серых покупок и услуг. Такого рода продукцию сложно приобрести в обычном интернет-магазине, так как это противозаконно.
vreyrolinomit
10th, Jan, 21Wow, superb blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is great, as well as the content!
viagra without prescription
10th, Jan, 21no prescription viagra
viagra no prescription
buy tadalafil 20mg online
12th, Jan, 21tadalafil
tadalafil 20 mg
generic cialis over the counter at walmart
12th, Jan, 21buy cialis over the counter at walmart
buy cialis over the counter at walmart
호텔카지노
15th, Jan, 21Terrific paintings! That is the type of info that are meant to be shared around the internet. Disgrace on Google for no longer positioning this submit higher! Come on over and consult with my site . Thanks =)
호텔카지노
15th, Jan, 21Hello. excellent job. I did not anticipate this. This is a great story. Thanks!
viagra pharmacy discount
19th, Jan, 21viagra pharmacy discount https://zsildenafil.com/
vreyro linomit
20th, Jan, 21I like this weblog very much, Its a real nice post to read and incur information.
더킹카지노
22nd, Jan, 21Some genuinely nice and useful information on this web site, besides I think the style contains excellent features.
street value of viagra 100
22nd, Jan, 21street value of viagra 100 http://viaaagra.com/
Google
23rd, Jan, 21Google
That will be the finish of this article. Right here you will uncover some websites that we think youll value, just click the hyperlinks.
Jdbxeloks
23rd, Jan, 21buy viagra australia viagra online 500mg sale viagra [url=http://llviabest.com/]generic viagra australia buy[/url] ’
ivermectin tablets for humans
24th, Jan, 21ivermectin tablets for humans http://ivermmectin.com/
when to take aurogra 100mg
25th, Jan, 21when to take aurogra 100mg https://aurogra.buszcentrum.com/
pharmaceuticals from canada hfmzuu
26th, Jan, 21cheapest viagra [url=http://www.canada1drugstore.com/tadalafil/]taking viagra[/url] baclofen
pharmaceuticals from canada canada-cialis
zortilo nrel
26th, Jan, 21I keep listening to the newscast speak about getting boundless online grant applications so I have been looking around for the most excellent site to get one. Could you tell me please, where could i acquire some?
vidalista shelf life potency
26th, Jan, 21vidalista shelf life potency http://vidallista.com/
refill prescription online doctor
26th, Jan, 21refill prescription online doctor https://medpills.bee-rich.com/
generic tadalafil
27th, Jan, 21generic tadalafil http://tadalafila.online/