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
- Get all categories and posts in those categories
- Pagination returns 404 after page 20
- Combine two taxonomies in a hierarchical tree
- Group WP_Query by category
- Display list of Sub-Categories and the posts they contain, within one main Category
- Excluding posts from a category but only if they’re not in multiple categories
- Remove child products from woocommerce category page [closed]
- Get a list of commas separated categories inside a loop
- Pagination on child category returns 404
- Disable pagination only for specific category
- Transient pagination not working properly
- Woocommerce custom loop to show all the products [closed]
- Check if post belongs to any category
- Show posts of category in a page
- How do I display the posts from a custom post type on a category.php page?
- How to group the loop posts in a particular by author?
- Exclude category from loop not working
- Pagination stops at page 6
- Paginated HTML Sitemap
- Is it possible to select and edit the way the most recent post from a certain category is displayed on the page?
- Pagination is broken and I need help fixing it
- Pagination on category page with custom post types
- Ignoring a category in WP_Query still shows the links in next_post_link()?
- Displaying multiple loops based off of category
- Create A Loop With A Variable Number of Posts For Each Bootstrap Row?
- Redirect category to url with /category
- How to query post like normal search would do. within search.php page
- Remove product category placeholder image (Woocomerce)
- WP Query with categories only shows one post and ignores the category
- How to make the link to the category for a post go to corresponding page number in archive?
- Exclude current post from loop
- How to insert category list into post creation page, and retrieve chosen categories?
- Set colors depending on category
- Custom loop of a single category, cannot order by date. What am I missing?
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- Having problems with paging
- Simple way to style posts of a single category differently in the loop and in single
- WP_Query with one category in args shows other categories
- Have posts that belong to multiple categories, exclude some categories from homepage
- Get the ID of the current post’s child category
- Return category posts with WP_Query
- Query Not working as expected
- Retrieve post tags from from main wp_query
- Paginate pages with dynamic query
- Display post thumbnail for specific category outside the loop
- Posts of specific category on page and excluded from index.htm
- Category sticky latest
- Exclude posts without category from loop
- Remove WP Core canonical for category pagination
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- How to show specify category template for both parent and child category
- Pagination inside the blog page not working
- Custom Query Pagination not working on static front page
- How to create a category loop on my blog (ACF Plugin)
- Pagination does not work with query_posts()
- Displaying Category in sidebar post widget but not in the loop on home
- WordPress pagination based on category
- Only show current category post
- Retrieving category pages from subcategory returns empty sets
- Pagination returns 404 after page 20
- category__and works, but why?
- Loop through posts of CatA and store value of CatB in separate array
- How to add an empty entry to masonry?
- Category slug in in loop always the same?
- 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)
- Multiple Categories under one URL, where ‘Front Page’ is used already
- Loop being strainge
- Pagination in custom query not working [duplicate]
- How to create a custom loop ordered by Categories on a Page Template?
- Category pagination not working in category.php please help me
- Order Categories by Character Count
- Get categories by title descendant
- Show number of posts AND number on current page (cannot make it work)
- wordpress category rewrite rule with pagination