paginazione cambiare orientamento
-
Salve, vorrei fare una modifica ad questa paginazione che ho trovato in rete,
l’unico problema che gli articoli vecchi .. me li mette come fossero “successivi”,
invece vorrei fare che mi scrivesse “articoli vecchi”, e quelli che scrivo adesso me li mette come “nuovi”.
Avete idea come fare?. Grazie mille.function my_pagination() { global $wp_query; if ( $wp_query->max_num_pages <= 1 ) return; $big = 999999999; // need an unlikely integer $pages = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'type' => 'array', ) ); if( is_array( $pages ) ) { $paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged'); echo '<div class="pagination-wrap"><ul class="pagination">'; foreach ( $pages as $page ) { echo "<li>$page</li>"; } echo '</ul></div>'; } }
- Il topic ‘paginazione cambiare orientamento’ è chiuso a nuove risposte.