How to Remove WordPress Top 10 Plugin’s Dashboard Pagination

For Those Who are still not familiar with Top 10 Plugin of WordPress

WordPress doesn’t count page views by default. Top 10 Plugin will count the number of page views on your single posts on a daily as well as overall basis. You can then display the page view count on individual posts and pages as well as display a list of most popular posts based on page views.

Includes a sidebar widget to display the popular posts. And, all settings can be configured from within your WordPress Admin area itself! You can choose to disable tracking of author visits on their own posts.

The Plugin also comes with a Admin Dashboard widget which displays the daily and overall stats in WordPress Dashboard. The admin widgets shows a pagination bellow. If you have lot of posts the pagination counts display gets long and nasty.

You can modify the admin widget to remove the pagination shown below. Here is how:

1. Open the in the WordPress Top Ten Plugin folder.
2. Comment out the following Code :

$output .=   '

'; if ($page != 0) { // Don't show back link if current page is first page. $back_page = $page - $limit; $output .= "« "; $output .= __('Previous',TPTN_LOCAL_NAME); $output .= "\n"; } for ($i=1; $i <= $pages; $i++) // loop through each page and give link to it. { $ppage = $limit*($i - 1); if ($ppage == $page){ $output .= "$i\n"; } // If current page don't give link, just text. else{ $output .= "$i \n"; } } if (!((($page+$limit) / $limit) >= $pages) && $pages != 1) { // If last page don't give next link. $next_page = $page + $limit; $output .= ""; $output .= __('Next',TPTN_LOCAL_NAME); $output .= " »"; } $output .= '

'; $output .= '

Popular posts by Top 10 plugin


Latest version of WordPress Top 10 Plugin is 1.6.1 . I wish in the next version they will use a dig style pagination which will be much user friendly and accessible.

Comments are closed.