Cómo agregar numeración de páginas en Wordpress

  • Autor Autor Krauzer
  • Fecha de inicio Fecha de inicio

Krauzer

Lambda
SEO
Hola amigos de Forobeta viendo páginas y leyendo un poco, es bueno para los bot´s de Google que un sitio tenga numeración de páginas como así:

Enlace eliminado

Según lo que he leido así es más accesible y rápido para los bot´s. Es por eso que lo quiero emplementar en mi página... Alguién sabe como hacerlo de las 2 formas:

- Manual: insertando código en la plantilla
- Plugin: recomendando un Plugin y explicando como configurarlo

Espero sus comentarios!:laugh:
 
Puedes usar digg pagination o wp-pagenavi, es facil de configurar, yo en lo personal uso el pagenavi.
 
Wp_pagenumbers uso yo :top:
 
wp-pagenavi :five:
 
Entonces los dos mejores Plugins son wp-pagenavi y Wp_pagenumbers. Pero alguién sabe como configurarlos?

O insertar un código para hacer manual sin plugin?
 
Este es el código de paginación que utilizo en Enlace eliminado, ya esta modificado del original:

PHP:
// Pagination code
/**
* A pagination function
* @param integer $range: The range of the slider, works best with even numbers
* Used WP functions:
* get_pagenum_link($i) - creates the link, e.g. http://site.com/page/4
* previous_posts_link(' « '); - returns the Previous page link
* next_posts_link(' » '); - returns the Next page link
*/
function get_pagination($range = 4){
  // $paged - number of the current page
  global $paged, $wp_query;
  // How much pages do we have?
  if ( !$max_page ) {
    $max_page = $wp_query->max_num_pages;
  }
  // We need the pagination only if there are more than 1 page
  if($max_page > 1){
	echo '<div id="pages">';
	echo '<span id="currentPage">Page '.$paged.' of '.$max_page.'</span>';
    if(!$paged){
      $paged = 1;
    }
    // On the first page, don't put the First page link
    if($paged != 1){
      // echo "<a href=" . get_pagenum_link(1) . "> First </a>";
    }
    // To the previous page
    // previous_posts_link(' « ');
    // We need the sliding effect only if there are more pages than is the sliding range
    if($max_page > $range){
      // When closer to the beginning
      if($paged < $range){
        for($i = 1; $i <= ($range + 1); $i++){
          echo "<a href='" . get_pagenum_link($i) ."' class=\"pagesLink\"";
          echo ">$i</a>";
        }
      }
      // When closer to the end
      elseif($paged >= ($max_page - ceil(($range/2)))){
        for($i = $max_page - $range; $i <= $max_page; $i++){
          echo "<a href='" . get_pagenum_link($i) ."' class=\"pagesLink\"";          
          echo ">$i</a>";
        }
      }
      // Somewhere in the middle
      elseif($paged >= $range && $paged < ($max_page - ceil(($range/2)))){
        for($i = ($paged - ceil($range/2)); $i <= ($paged + ceil(($range/2))); $i++){
          echo "<a href='" . get_pagenum_link($i) ."' class=\"pagesLink\"";
          echo ">$i</a>";
        }
      }
    }
    // Less pages than the range, no sliding effect needed
    else{
      for($i = 1; $i <= $max_page; $i++){
        echo "<a href='" . get_pagenum_link($i) ."' class=\"pagesLink\"";
        echo ">$i</a>";
      }
    }
    // Next page
    // next_posts_link(' » ');
    // On the last page, don't put the Last page link
    if($paged != $max_page){
      echo " <span id=\"lastPage\"><a href=" . get_pagenum_link($max_page) . ">Last Page</a></span>";
    }
	echo '</div>';
  }
}