{"id":15473071,"url":"https://github.com/david-binda/no-offset-pagination-for-wordpress","last_synced_at":"2026-03-10T02:03:53.445Z","repository":{"id":21006281,"uuid":"24296906","full_name":"david-binda/no-offset-pagination-for-wordpress","owner":"david-binda","description":null,"archived":false,"fork":false,"pushed_at":"2014-09-24T13:25:33.000Z","size":248,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T21:57:26.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/david-binda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-21T16:53:26.000Z","updated_at":"2023-02-12T15:38:48.000Z","dependencies_parsed_at":"2022-08-05T10:15:17.878Z","dependency_job_id":null,"html_url":"https://github.com/david-binda/no-offset-pagination-for-wordpress","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/david-binda/no-offset-pagination-for-wordpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-binda%2Fno-offset-pagination-for-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-binda%2Fno-offset-pagination-for-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-binda%2Fno-offset-pagination-for-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-binda%2Fno-offset-pagination-for-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/david-binda","download_url":"https://codeload.github.com/david-binda/no-offset-pagination-for-wordpress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-binda%2Fno-offset-pagination-for-wordpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30322637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T02:42:42.764Z","updated_at":"2026-03-10T02:03:48.438Z","avatar_url":"https://github.com/david-binda.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"No Offset Pagination for WordPress\n==================================\n\nThis is an experiment trying to implement **keyset pagination** aka *No offset pagination* as it was proposed by Markus Winand ( @fatalmind ) on http://use-the-index-luke.com/no-offset to **WordPress**\n\n[![Do not use offset for pagination. Learn why.](http://use-the-index-luke.com/img/no-offset-banner-728x90.white.png)](http://use-the-index-luke.com/no-offset)\n\n## Template tags usage\n\n\nThe plugin provides custom template tag for displaying next/prev navigation on archive pages (eg.: index.php or archive.php).\n\n```\nno_offset_pagination();\n```\n\nIt should be used instead of standard ``wp_link_pages();`` or ``twentyfourteen_paging_nav();`` in case you are working with default Twentyfourteen template.\n\n## Custom plugin / functions.php usage\n\nYou can also take advantage of this plugin in your custom development efforts in your plugins or theme functions.php file.\n\nYou just have to define extra query_vars for [WP_Query](http://codex.wordpress.org/Class_Reference/WP_Query). \n\n(__Please note:__ _you still must have this plugin installed before ``nooffset`` param is taken into consideration_)\n\n```php\n$args = array(\n  'post_type' =\u003e 'post',\n  'post_status' =\u003e 'publish',\n  'posts_per_page' =\u003e 10,\n  'nooffset' =\u003e array( 'next' =\u003e $last_displayed_post_id ) //this is the plugin's specific query_vars definition\n);\n$query = new WP_Query( $args );\n$posts = $query-\u003eget_posts();\nforeach ( $posts as $post ) {\n  ...\n}\n```\n\nFor listing previous posts, you have to get the most recent post's ID ( the one displayed as first on your page ) and refer it from ``nooffset`` array this way:\n\n```php\n$args = array(\n  ...\n  'nooffset' =\u003e array( 'prev' =\u003e $most_recent_displayed_post_id ),\n  ...\n);\n...\n```\n\n## SQL Queries produced by the plugin\n\nIf you are interested how does the produces SQL queries look like, visit the [wiki](https://github.com/david-binda/no-offset-pagination-for-wordpress/wiki/SQL-Queries)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-binda%2Fno-offset-pagination-for-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-binda%2Fno-offset-pagination-for-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-binda%2Fno-offset-pagination-for-wordpress/lists"}