Title: Responsive Pagination
Author: Bagus Sasikirono
Published: <strong>20. mai, 2020</strong>
Last modified: 23. juli, 2021

---

Søk i utvidelser

![](https://ps.w.org/responsive-pagination/assets/banner-772x250.png?rev=2344847)

Denne utvidelsen **har ikke blitt testet mot noen av de siste 3 hovedutgivelsene
av WordPress**. Den er kanskje ikke lenger holdt vedlike eller støttet, og den kan
ha kompatibilitetsproblemer med nyeste versjoner av WordPress.

![](https://ps.w.org/responsive-pagination/assets/icon.svg?rev=2308650)

# Responsive Pagination

 Av [Bagus Sasikirono](https://profiles.wordpress.org/sasikirono/)

[Last ned](https://downloads.wordpress.org/plugin/responsive-pagination.1.4.1.zip)

 * [Detaljer](https://nb.wordpress.org/plugins/responsive-pagination/#description)
 * [Omtaler](https://nb.wordpress.org/plugins/responsive-pagination/#reviews)
 *  [Installering](https://nb.wordpress.org/plugins/responsive-pagination/#installation)
 * [Utvikling](https://nb.wordpress.org/plugins/responsive-pagination/#developers)

 [Brukerstøtte](https://wordpress.org/support/plugin/responsive-pagination/)

## Beskrivelse

Responsive Pagination plugin lets you configure your paginations to adapt to different
screen size. Your paginations can be shown differently based on browser width as
in responsive web design concept.

For instance, you might want to have a longer pagination with many page numbers 
when your site visitors are using desktops and large screens, but need shorter pagination
with only _Prev_ and _Next_ link when they’re using phones.

You may try using this plugin when you found your theme is not doing well with the
responsive design on its pagination. This plugin lets you configure manually to 
the desired breakpoints.

### Two Different Methods to Apply Responsive Pagination

You can choose the way you want to apply responsive pagination.

#### Method A : Convert Existing Paginations (No Coding Required)

This method will convert the existing paginations from your theme into responsive
paginations without needs to add any WordPress shortcode or PHP code. You only need
to fill the selectors (_CSS_ or _jQuery_-like selector) of the existing pagination
elements. You’ll input the selectors in Admin Settings Page (_Settings > Responsive
Pagination_)

#### Method B : Create new Pagination Programmatically from Scratch

This method will need you to insert PHP code into template files directly using 
_Responsive Pagination API_. This method supports queries using _WP\_Query_, or 
even something more generic without _WP\_Query_.

### Responsive Pagination API (For Programmatic Usage)

_Note : This API section is a short guide for creating responsive pagination programmatically.
However, there is easier solution using this plugin without touching any code – 
that is by converting your theme’s existing pagination from within Admin Settings
Page with just providing its CSS/jQuery selector._

If you want to create responsive pagination programmatically, this plugin adds new
function for you to use, which will render a new pagination where you put the function.

    ```
    <?php create_responsive_pagination( $id, $args ) ?>
    ```

Parameters :

 * `$id`: _(string)_ _(required)_ ID for the new pagination you want to create in
   _kebab-case_ format.
 * `$args` : _(WP\_Query | array)_ _(required)_ [WP_Query](https://developer.wordpress.org/reference/classes/wp_query/)
   instance, or an associative array contains :
    - `$current` : _(int)_ Current page
    - `$total`: _(int)_ Total pages
    - `$urlFirstPage` : _(string)_ URL for first page
    - `$urlPattern`: _(string)_ URL pattern for this pagination by using `{pagenum}`
      tag.

Note : Pagination settings and Breakpoint Configurations are still configured from
within Admin Settings Page.

#### Example (For Programmatic Usage)

Example for creating pagination for posts within main loop using _WP\_Query_. This
also works with custom post type as long as you have _WP\_Query_ within loop.

    ```
    <?php
      global $wp_query;   // or some custom WP_Query instance
      if( function_exists( 'create_responsive_pagination' ) ) {
          create_responsive_pagination( 'my-pagination-id', $wp_query );
      }
    ?>
    ```

Example for creating a more generic pagination by providing your own data for current
page, total pages, URL first page, and URL pattern without _WP\_Query_.

    ```
    <?php
      if( function_exists( 'create_responsive_pagination' ) ) {
          create_responsive_pagination( 'my-pagination-id', array(
            'current'         => $my_current_page,   // your current page here
            'total'           => $my_total_pages,    // your total page here
            'url_first_page'  => 'https://www.example.com/archives/',   // URL when current page = 1
            'url_pattern'     => 'https://www.example.com/archives/page/{pagenum}'   // the pattern using {pagenum} tag
          ) );
      }
    ?>
    ```

## Skjermbilder

 * [[
 * Pagination example on Desktop
 * [[
 * Pagination example on Tablet
 * [[
 * Pagination example on Phone
 * [[
 * Admin – Convert Paginations
 * [[
 * Admin – Pagination Settings
 * [[
 * Admin – Pagination Settings (Breakpoint Configurations)

## Installasjon

The installation is pretty standard, just like any other plugins.

 1. install the plugin through the WordPress admin on ‘Plugins’ screen directly, or
    upload the plugin files to the `/wp-content/plugins/responsive-pagination` directory.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress admin.
 3. Use «Settings > Responsive Pagination» screen within WordPress admin to configure
    the plugin.

## Ofte stilte spørsmål

### Where can I found the Admin Settings Page

In the admin, go to «Settings > Responsive Pagination»

### What is «320px and up», «720px and up», etc ?

Those are the breakpoints you’ll want to configure. Each denotes the minimum width
of viewport where the corresponding configuration will be applied until the next
breakpoint. The highest breakpoint configuration will be applied for all bigger 
viewport.

For instance, if there are 3 breakpoints (320px, 720px, and 1024px), then

 * «320px and up» configuration is applied to viewport width of 320px – 719px
 * «720px and up» configuration is applied to viewport width of 720px – 1023px.
 * «1024px and up» configuration is applied to viewport width of 1024px and more

### What is «tags» ?

A tag in Responsive Pagination is like a variable where it holds a value and will
be rendered with the actual value. `{current}` and `{total}` are the example of 
tags.

So, if the current page is 5 and total page is 12, then `"Page {current} of {total}"`
will render «Page 5 of 12».

### My pagination is responsive now, but I want to customize it more

If you want to apply more custom styling, you can set additional class to the components
from Admin Settings, and apply manual CSS.

## Vurderinger

![](https://secure.gravatar.com/avatar/6981295cd810f036dc2488edb93612d897f51454f5456611d5b559056cbbe54d?
s=60&d=retro&r=g)

### 󠀁[Finally!](https://wordpress.org/support/topic/nice-plugin-keep-going/)󠁿

 [Bunderan 11 Store](https://profiles.wordpress.org/bunderan11/) 22. mai, 2020

Finally we can configure our responsive pagination, instead of just letting our 
theme decide it for us. Nice plugin, keep going.. Thanks!

 [ Les 1 vurdering ](https://wordpress.org/support/plugin/responsive-pagination/reviews/)

## Bidragsytere og utviklere

«Responsive Pagination» er programvare med åpen kildekode. Følgende personer har
bidratt til denne utvidelsen:

Bidragsytere

 *   [ Bagus Sasikirono ](https://profiles.wordpress.org/sasikirono/)

[Oversett “Responsive Pagination” til ditt språk.](https://translate.wordpress.org/projects/wp-plugins/responsive-pagination)

### Interessert i utvikling?

[Bla gjennom koden](https://plugins.trac.wordpress.org/browser/responsive-pagination/),
sjekk ut [SVN-repositoriet](https://plugins.svn.wordpress.org/responsive-pagination/),
eller abonner på [utviklingsloggen](https://plugins.trac.wordpress.org/log/responsive-pagination/)
med [RSS](https://plugins.trac.wordpress.org/log/responsive-pagination/?limit=100&mode=stop_on_copy&format=rss).

## Endringslogg

#### 1.4.1

 * Fix: Responsive issue on Firefox in 1 pixel below lowest breakpoint

#### 1.4.0

 * Feature : Take approach to avoid theme styling interference as possible
 * Improvement: Breakpoint Configurations now in separate tab
 * Improvement: Change in Pagination Settings looks
 * Improvement: Active vertical menu style when in focus
 * Improvement: Active vertical menu go to right tab after adding & removing breakpoints
 * Improvement: Add footer signature

#### 1.3.0

 * Feature: Introduce visual styling feature
 * Feature: Different items width for every component in every breakpoint (pagenumbers,
   prevNext link, and firstLast link)
 * Feature: Different items height in every breakpoints
 * Feature: Different space between items (gutter) in every breakpoints
 * Tweak: Pagination settings initial values

#### 1.2.0

 * First public release.

## Meta

 *  Versjon **1.4.1**
 *  Sist oppdatert **5 år siden**
 *  Aktive installasjoner **10+**
 *  WordPress-versjon ** 3.5.0 eller nyere **
 *  Testet opp til **5.8.13**
 *  PHP-versjon ** 5.3 eller nyere **
 *  Språk
 * [English (US)](https://wordpress.org/plugins/responsive-pagination/)
 * Stikkord
 * [mobile](https://nb.wordpress.org/plugins/tags/mobile/)[pagination](https://nb.wordpress.org/plugins/tags/pagination/)
   [responsive](https://nb.wordpress.org/plugins/tags/responsive/)
 *  [Avansert visning](https://nb.wordpress.org/plugins/responsive-pagination/advanced/)

## Vurderinger

 5 av 5 stjerner.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/responsive-pagination/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/responsive-pagination/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/responsive-pagination/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/responsive-pagination/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/responsive-pagination/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/responsive-pagination/reviews/#new-post)

[Se alle omtalene](https://wordpress.org/support/plugin/responsive-pagination/reviews/)

## Bidragsytere

 *   [ Bagus Sasikirono ](https://profiles.wordpress.org/sasikirono/)

## Brukerstøtte

Har du noe å si? Trenger du hjelp?

 [Vis brukerstøtteforumet](https://wordpress.org/support/plugin/responsive-pagination/)