Set a variable
$product_view=isset($_GET['product_view']) ? $_GET['product_view'] : 'grid';
Now, how to keep it like this with pagination URL’s.
echo paginate_links(array(
'base' => add_query_arg('product_view', $product_view),
'format' => '',
'prev_text' => __('«'),
'next_text' => __('»'),
'total' => ceil($total / $items_per_page),
'current' => $page,
'add_args' => array(
'category' => 'fruit',
'color' => 'red'
)
));
I hope this will help you to solve your problem.
Thank You,
Related Posts:
- Access the same page from multiple urls (wildcard)
- How to inject custom url path for page ?
- Remove number in URL
- Clean URL link for page without number
- How to Add a Rewrite Rule for Only One Page?
- Is there a way to create a URL (new WP page) that can only be accessed from a specific source?
- How to change only the home page / front page url on wordpress
- Blank Pages with # URL & Google
- Site url is not showing the home page
- Access the same page from multiple urls (wildcard)
- How to show the root webpage on all subpaths
- Organizing Your Pages
- How to add URL-Parameter for Javascript Widgets?
- How to create cutom link for page
- Separate URL for a specific page
- return page name in url
- How to fix broken URL – https://mywebsite.com/comments/feed/
- what does the symbol “?” mean and how can i edit that page?
- WordPress form submit to custom page template does not work
- Access link page and not folder content of that link
- New page has incorrect URL
- Is it possible to rewrite a page url Without setting the permalinks to Post Name?
- Temporary download page or restrict static download page based on how the user got to the page?
- How to change the default location where new post gets stored?
- How to configure WordPress to handle 75,000 pages?
- How to disable posts and use pages only
- multi page password protection
- Create a “Dummy” parent page for a hierarchy in page listing?
- Change admin startpage to Pages-page?
- Password protected post or page – error message by wrong password?
- Get next/previous cousin page
- I want only my sub-pages to be clickable in the navbar
- How do I turn comments off for pages, but not posts?
- WordPress 4 and wp_editor() Not Showing Visual/Text tabs
- Check to see if page exists problems
- Custom /page/2/ template (different from index.php)
- Form action redirect to the same page
- How do I create a separate page for each author?
- Overriding the currently selected menu item
- Front Page not showing on Pages
- WordPress pages with hierarchy
- How to incorporate Documentation into wordpress?
- Get page by its ID and display it on another one
- Get all pages that are published
- Add a predefined page to site
- creating and styling a within a page
- What are trackbacks?
- How to enumerate a list of posts?
- Weird issue with is_pages() with array
- Missing ‘Page Attributes’ in page edit
- How can I redirect to my custom page without loading the Dashboard itself?
- Remove ID page from wp_count
- category slug and page slug same
- Updated WordPress, now getting errors on site
- Edit Parent page drop menu when creating a page
- Get parent of current page
- Attachment pages stealing page slugs
- How to add an external php page with wordpress?
- How to parse a custom url (within WP site) and obtain params passed to that URL
- Exclude pages by menu order
- How to exclude authors from get_pages()
- Folder wordpress page redirect
- Dynamic page with comments
- Display pages in alphabetical order
- Listing all child-pages of a parent-page on the parent-page and each child-page?
- Loading scripts on specific pages using PHP in footer.php
- How to recover pages from site with only ftp? [closed]
- Archive limit the text of the_content
- upgrade has caused page content to disappear
- Can’t find the page that is using a slug
- Translate dashboard metabox
- Append a parametter at first or last to a certain URL
- Create page template
- Add more than one query parameter onto wordpress url
- Loading ACF Field content on a 404.php page
- Cannot Create A Page or Post in WordPress 5.2.1
- How can a .css file be applied to a virtual page?
- WordPress blog posts template bug [closed]
- Checkboxes to automatically create pages when I activate a theme
- Front Page post mirroring revisions to other pages, constantly updating itself
- Cannot use old slug – it just 301s to site home page
- Display inner pages like posts.[Like how post excerpt works]
- include exception inside theme for empty widget area
- My pages disappeared from the list
- How to display time when page is created and edited
- Add text to the bottom of particular pages
- Access wordpress pages using a self signed shared ssl
- Page loads all pages of the image gallery with pagination
- Group Pages based on Parent in Admin Area
- How to exclude page in pages module
- get id custom tables on current page
- static page with buton that opens collect email form
- Multiple WordPress Pages
- How to create an user defined page?
- How can one get page by pagename if it is a child page?
- I have over 3000 child pages – but I need a different main page
- How to enable automatic search results in WordPress
- How to make a conditional statement that checks if the page is the child of a certain page?
- Is it possible to keep the page title from actually appearing at the top of the page?
- Missing page on wordpress “Pages” dashboard [closed]