Page Rank Sculpting
Not too long ago we were able to control the flow of page rank throughout our site, sort of. I don’t plan on explaining page rank here, if you need a refresher go to the source. I am working on a links page that will pass solid page rank and not just a normal links page that doesn’t have any power.
Then, I ran into a problem from the past.
Google helped introduce the NOFOLLOW attribute mainly because of blog spam and now WordPress uses this attribute on most every link in your blog that is created.
Removing nofollow from WordPress Bookmarks
While having rel=”nofollow” on my comments is a great idea, I would like to remove this from the links that are created on the blogroll. Obviously I can manually create all the links on my new links page, but what if I create a WordPress theme and want people to be able to add links easily? WordPress already has a feature for bookmarks; so I should try to use their system if I can and save coding time.
Using a WordPress function
When I created my links page I used the wp_list_bookmarks() template tag to get my list of links. I first thought that I would need to pass some sort of command through this template tag on my links page, but after some research I found a very easy solution using my functions.php file; just add this code:
function nofollow_my_bookmarks( $links ) {
foreach($links as $link) {
$link->link_rel = '';
}
return $links;
}
add_filter('get_bookmarks', 'nofollow_my_bookmarks');
Code Explained
Basically there are only two steps here; first you create the function that will replace the code in the links attributes (removing the nofollow) and second you add your filter to the get_bookmarks WordPress hook.
- function – is what creates the function
- nofollow_my_bookmarks – is the name of the function
- $links – is the variable that will contain the data from the get_bookmarks hook
- foreach – will run through each link in the content ($links)
- $links as $link – will create the $link variable for each link in the content so we can change the attributes
- $link -> link_rel = ‘ ‘ – this will run for each link and look for the REL attribute. Once found it will replace it with ‘ ‘ or nothing
- return $links – this sends the new data back to WordPress with rel=’ ‘ instead of anything that was in the rel already
- add_filter() – with this we are hooking into WordPress
- get_bookmarks() – this is the WordPress hook we are looking for that lists all the links from your blogroll
- nofollow_my_bookmarks – here we call the our function name so that this function will be called each time someone uses the wp_list_bookmarks() template tag
Conclusion
If you run this function ‘as is’ then you will REMOVE all code in your REL attribute for links
I am starting my site from scratch and I have no plugins adding code to my links; so this is not a problem for me. This could be a problem for you, just check your source code on your blog roll to check your rel attribute settings.
By changing the function a little you could add your own code or search for “nofollow” and remove just that text…Be creative :~D

I will be starting my own site in a couple of days, let me check if this works for me. I think this will be a great idea to implement – im passing it to my friends too. Keep us posted with additional information.
Good luck Jom, let me know what your new site it..