It looks like the paged variable isn’t being added to the query arguments. This should work:
$paged = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1;
$args = array(
'post_type' => 'animals',
'posts_per_page' => 4,
'category' => $queryString,
'paged' => $paged
);
$wp_query = new WP_Query( $args );
Also, as a note, $wp_query
is a WordPress global variable. It would be safer to use a different name like $my_query
, $custom_query
, $steve
, etc.
Related Posts:
- Multiple Loops on category.php with pagination on last loop
- Pagination on category.php and tag.php not working
- WP_Query not looking at child category
- Display one latest post from multiple categories
- 3 Columns, 3 Categories, One Archive, and Pagination
- Five posts from a category in footer
- Enter a variable in the ‘category_name’ parameter
- How to do paging in the loop?
- category__not_in and id values from variable
- More efficient way to list posts by category [duplicate]
- Show multiple categories in query using redux framework variable
- multiple values in an array for category__and does not work with WP_Query
- the_category() doesn’t working in wp_query loop
- Conditional category query breaking?
- Function the_posts_pagination() not compatible with WP_Query arguments
- Show the number of the post
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- Loop within category’s posts
- Printing direct descendants of a category with WP_Query
- Custom Category Page Not Working [duplicate]
- How do i add custom post types to this query?
- Using pagination with multiple loops causes it to break
- How can I implement pagination on custom category page?
- Pagination only showed when no category is set in wp_query
- “Next posts” of a category do not call category.php
- Displaying Category in sidebar post widget but not in the loop on home
- WordPress pagination based on category
- Problem with custom WP_Query and underlying pagination/posts_per_page
- Only show current category post
- Querying posts from two different categories while looping inside another loop
- Trying to display all posts in a category
- How to add Pagination to foreach loop to page
- Retrieving category pages from subcategory returns empty sets
- 2 Loops on one page – pagination of 2nd loop ignore array of excluded posts
- Pagination returns 404 after page 20
- Category page shows only 1 post when that post has more than 1 category?
- Loop doesn’t work
- Removin /page/2 from pagination
- Configure query with multiple categories in a custom order?
- WordPress pagination not working because of subcategory
- custom query – offset to pagination
- Display Taxonomies in loop with template args
- How to loop through a custom field for each post, & display?
- show category name before first posts in each category
- How can I modify this code to iterate over an array of categories?
- Custom Post Type + Category archive
- Create multiple sections for all categories and then queries all the posts for each of those categories
- Pagination not working with WP_QUERY
- Paginations in Category Page Leads to Sample Pages
- How to exclude a specific categogy from a custom page template
- Unable to get all tags from specific categories
- category__and works, but why?
- Display one post on category.php: Wrong featured image
- foreach,having wp_query inside, breaks after showing one result
- Display related posts with same category or same tag return blank
- $args Orderby The number
- Category foreach Paging
- Transfering static site to wordpress and retaining category by month paginations
- Loop through posts of CatA and store value of CatB in separate array
- How to add an empty entry to masonry?
- Querying Multiple Categories With Different Offsets
- No content found on page 2 of pagination with 1 post per page
- Loops in category description
- date.php shows all posts. how to fix it?
- How to get multiple loop in category.php, my scripts becomes madness
- Several loop in search result
- wp_query pagination links producing 404
- Category slug in in loop always the same?
- Make assigning post to a specific category equivalent to assigning it to all categories
- how to get number of posts in a category on a specific date
- Show posted on date only for posts in a certain category
- 2 loops in archive.php (one for each category)
- My Query is getting the wrong data
- Detecting top parent category fails on home page
- WP_query exclude a category unless it has more than one catagory
- wordpress category.php query for featured news item, broken pagination and repeating posts
- Show only one category in main query, issues on tag page
- Paginating a list of all posts collected by category titles
- Paginate WordPress Category Pages
- Multiple Categories under one URL, where ‘Front Page’ is used already
- Loop being strainge
- Pagination in custom query not working [duplicate]
- Fourth page of custom post type archive page does not exist
- Custom loop by url
- Custom WordPress category page showing all posts rather than the specified category
- Multiple loops on index page with sticky post and pagination
- How do I hide posts in a category from all listings but still allow the posts to be viewed?
- Pagination problem with multiple loops on the same page
- How to create a custom loop ordered by Categories on a Page Template?
- Showing one post from each category, paged?
- WordPress Post Looping? [duplicate]
- Why Pagination is not working on Category.php
- WordPress post pagination on custom template not working
- Narrow Down a Shop Page Results Based on a Product Tag in WooCommerce
- Pagination in category.php not functioning
- Can i know if it is Category first page or 5th?
- Do not show all post from all categories, just show posts from category in current loop
- Exclude posts from certain category breaks custom pagination
- IF have_posts contains posts from a certain category
- Category pagination not working in category.php please help me