Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
Wordpress pagination prev/next arrows

My Wordpress pagination works but I'd like to make some 'minor' adjustments. I thought I'd be able to find some code I could drop into my functions.php but I can't find anything that does the job, so I'm hoping for a bit of help.

Basically I want the pagination to always display the prev/next arrows, whichever one isn't needed has a class of inactive for styling - currently whichever isn't required isn't displayed at all. Also, I'd like to know if '...' is added between a range of pages if they exceed a certain amount to prevent the list from getting too long?

Here's the current code I have in functions.php:

function html5wp_pagination()
{
    global $wp_query;
    $big = 999999999;
    echo paginate_links(array(
        'base' => str_replace($big, '%#%', get_pagenum_link($big)),
        'format' => '?paged=%#%',
        'current' => max(1, get_query_var('paged')),
        'total' => $wp_query->max_num_pages
    ));
}

Hope someone can help. I'm getting there with Wordpress/PHP development but somethings still look totally foreign to me!

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Update Your pagination code like below:

echo paginate_links(array(
        'base' => str_replace($big, '%#%', get_pagenum_link($big)),
        'format' => '?paged=%#%',
        'current' => max(1, get_query_var('paged')),
        'total' => $wp_query->max_num_pages,
        'show_all' => False,
        'prev_next' => True,
        'prev_text' => __('<'),
        'next_text' => __('>'),
        'type'      => 'list',
        'add_args' => ''
    ));
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda