RSS WordPress - how to disable the indexing of links in the widget
I like the standard widget WordPress RSS - it can be some fun to blog and share with readers some interesting information. Do not like it just the fact that this RSS WordPress does not cover the links to your items from being indexed. In the good need to be able to do so. And it is possible, and easily accessible.
First you need to find a file corresponding to WordPress for the withdrawal of RSS-widget. For this I used the utility grep (the good, the search of alternatives, it just does not require):
grep -rino --exclude =cache 'rsswidget' . /* | more
From the results in the first place seemed to me an interesting file ./wp-includes/default-widgets.php , and that it needed to make edits to disable indexing of RSS-items.
Line 728 should be amended as follows:
$title = "<noindex><a class='rsswidget' href=' $url ' title='" . esc_attr ( __ ( 'Syndicate this content' ) ) . "'><img style='background:orange;color:white;border:none;' width='14' height='14' src=' $icon ' alt='RSS' rel='nofollow' /></a></noindex> <noindex><a class='rsswidget' href=' $link ' title=' $desc ' rel='nofollow'> $title </a></noindex>" ;
thus, we forbid indexing reference, standing in the header of the widget.
Now close the actual elements of RSS - replace line 837:
echo "<li><noindex><a class='rsswidget' href=' $link ' title=' $desc ' rel='nofollow'> $title </a></noindex> {$date} {$summary} {$author} </li>" ;
In the same file can be edited not only RSS, but the rest of the standard widgets WordPress. For example, in the widget "Control" may be of interest line number 300:
< li >< a href = "http://wordpress.org/" title = "Работает на WordPress" > WordPress . org </ a ></ li >
Containing a direct link to the site unterminated WordPress.
To create a website with links to the sale of external links on the page - osnovonoy rate and edit standard widgets will help get rid of the "objectionable" references.
Further study of default-widgets.php let there be a separate task for those interested.
Good luck! ![]()
More on similar topics:
Filed under: SEO , Blogging |
Tags: How-to , SEO , WordPress , blog , tricks |
9 comments 


Still, you can close links to the counters (mail \ rambler).
Of course, but it's pretty obvious, since the counter code given to you in his arms, and then have to search.
Not everything is obvious. For example when I added liveinternet nofollow cut down counter.
I also count them hanging, but I do not remember such complications. Maybe the code changed?
Cyril, thank God, I work with nofollow count for the second year ... I do not think that in this way may be cut
Yes counters - a perennial problem at all (((
Good article I liked
but how close do all widgets
What do you understand by that? Simply remove the sidebars can be through the control panel, the code of standard widgets is in default-widgets.php, and plug-ins put their widgets.