How to add ‘NoFollow’ to WP-PageNavi

Yesterday, when I checked my blog, I found a problem. My blog is created by WordPress, so I used the WP-PageNavi Plugin. However, it hasn’t added ‘rel=nofollow’ on links.

You know, it is not friendly to seo. I found the solution by visiting the internet.

Picture 1:


This is source code.

<div class='wp-pagenavi'>
<span class='pages'>Page 1 of 14</span><span class='current'>1</span>
<a class="page larger" href="">2</a>
<a class="page larger" href="">3</a>

Obviously it hasn’t added ‘nofollow’ on links.

To add ‘NoFollow’ to WP-PageNavi

1. Log in your wordpress admin panel and Editor plugins


2. Select the Plugin (WP-PageNavi) and Click it.


3. See this picture, select this .php file (Util.php)

Page Navi Util PHP

4. Modify the code


About 410 line;


return "< {$tag}>{$content}";


return "< {$tag} rel='external nofollow'>{$content}";

5. Click ‘Update File’ Button;

6. Finish;