try this for get_query_var
<?php $paged = get_query_var( 'paged', 1 ); ?>
For more information check this url
https://codex.wordpress.org/Function_Reference/get_query_var
Related Posts:
- Sidebar pagination posts not shown when sidebar is in single.php
- How to add post page pagination to template part?
- Changing pagination list class
- Paged posts – how to use numbers and next/previous links?
- How to add CSS Class to previous_post_link or get previous/next post link URL
- Paginate links with “ugly” and “pretty” permalinks?
- Strange paginate_links behavior. First page link is always whatever page I’m on, all other links are correct
- Next/Previous Links in same category
- Pagination Not Displaying on Custom Term Archive
- Combining WordPress pagination functions for archives and search results
- paginate_links() outputs extra empty pages on custom loop
- In pagination, change link for page 1 to homepage
- Link to previous month’s posts
- How to get “nexepagelink” and “previoiuspagelink” in wp_link_pages?
- Last page in pagination does not match max_num_pages – the overall post count is less according to pagination
- I want to remove numbers from the_posts_pagination function
- Invalid previous pagination links generated from paginate_links()
- Using Ajax in the prev_posts_link and next_posts_link
- Limiting number of visible links displayed with wp_link_pages
- search with pagination not working as expected
- Pagination Not Working on `WP_Query` Archive Page
- Include a leading zero in pagination
- Pagination Links showing incorrect previous page number
- Custom admin page pagination permissions error
- Paginate Links – Mid Size Less Than 2
- Pagination Links Not Showing Up on single.php posts on iOS Devices
- Paginate_links only working on first page
- Problem when I try to insert pagination
- Pagination on WP_User_Query not updating current page
- Automatically adding a link to the next page link before ” tag in posts?
- How to add pagination to category templates
- How to Show Next-Previous Link Only
- Show number of pagination pages even when total under two
- Can’t Add Pagination
- Broken pagination links on WP 4.9.10 blog pages
- Override the WordPress default pagination markup
- 404 page not found on pagination in home page while navigating to next page
- The pagination is working on Local, not on LIVE. why?
- Post navigation doesn’t show (in custom template, custom post type, custom query)
- Paginate Links in Wp Query Shortcode
- Extra pagination pages being wrongly generated
- Google Indexed sub pages in wordpress pagination in post
- Output wp_link_pages as raw url
- Paginate Links function: Page 1 doesn’t work
- the_posts_navigation is not working
- Disable pagination on frontpage
- Paginating custom posts in categories yields a 404 error
- WordPress 404 pagination (/page/2) error?
- How can I get my pagination to recognize that it is on the first page?
- Pagination only working on index page not on a template page
- Pagination Broken on Loop using ACF
- Page navigation not working correctly on index but only on categories
- I want the “next” and “previous” buttons to appear in my custom navigation function
- How can I see all of a post’s comments on a single page as a reader, if pagination is enabled?
- posts_per_page & pagination conflict
- Pagination is not working wp_query custom fields values
- wordpress Static Page pagination
- Move pagination numbers above plug-ins
- Possible to paginate on single.php?
- I want to change the media list with additionally query
- Content only on last page, if the page has pagination
- Display only the current page number and another numbered page in pagination
- How can I paginate image attachments in a post?
- Pagination shows same contents all pages
- How to test pagination? [closed]
- WordPress loading index page instead of archive.php
- How can I paginate a list of related posts?
- tag.php pagination and query_posts()
- Add icons in paginate_links()
- How can I use var php with javascript to build custom page? [closed]
- WordPress single page template, custom post type, pagination orderby title – alphabetical order
- How To Show All Custom Post Types In A Category Instead Of Pagination?
- Single Page Views and Pagination View Depending on URL Query
- Category lists page foreach Paging
- Adding range to wp_link_pages()
- WordPress triggers 404 on page 2 for custom search query
- Search page pagination does not work
- Pagination 404s on custom query
- Customise wp_List_pages to output a UL LI
- Pagination in home page for a custom loop loads same content
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- Universal CPT archive template and half working pagination
- Using Pagination for Custom Post Type and keeps returning 404
- remove $_GET-parameter from WP_List_Table::tablenav
- WP Page Navi. 404 error when using posts per page parameter [duplicate]
- Pagination for previous page/next page (with more than one post/page)
- Pagination for custom post types
- Pagination in author, category, archive and tags pages does not work
- WordPress pagination with wp_query_columns
- How can I paginate results from get_children
- Why can i add /page/674874 (or any number) to a URL and it still pulls up that page?
- How to add numbers pagination to this blog page?
- Pagination with Metaboxes or Custom Fields
- 2 Columns with Independent Pagination
- Prevent WordPress to remove query vars from url
- How to display most viewed posts without any plugins
- pagination for blog landing page
- Pagination is not working correctly there is this wierd looping
- Stop pagination when static homepage is set
- Is ‘pm’ used by core?