The first problem can be solved by changing the query_posts in your work section. Replace '&category_name=work'
with '&category_name=work&paged=1&posts_per_page=-1'
For the second problem, why not use the category template itself in place of index.php
?
As a side note, you should not use query_posts
for this use case. In place of that you should use a new WP_Query
object for the work loop & pre_get_posts
filter for the main loop
Related Posts:
- Archive pagination causing 404 with permalinks structure
- Redirect category to url with /category
- The default code for “posts_nav_link” on category.php isn’t working
- Multiple Loops on category.php with pagination on last loop
- WordPress alphabetical A-Z custom post type post result display
- Pagination on category.php and tag.php not working
- How to do paging in the loop?
- Pagination breaks on child-categories, works fine on parent-category
- Conditional category query breaking?
- Show the number of the post
- Remove WP Core canonical for category pagination
- Loop within category’s posts
- WordPress Numeric Pagination with Query String [duplicate]
- How do I hide posts in a category from all listings but still allow the posts to be viewed?
- How can I implement pagination on custom category page?
- How to show 1-5 of X Total Results
- Show Posts from Single Category Not Working
- Is there a reason I cannot get the current category in a loop?
- Hierarchical permalink structure for posts showing categories and sub-categories
- Category archive is displaying all posts rather than the specific category
- Use the category name instead of category slug in permalinks
- new WP_Query all post in a category inside the loop
- Trying to get variables in hacked category dropdown
- Problem with different query loops (and “main loop”) on category template page!
- How to add orderby parameter for sorting on category.php
- category__not_in and id values from variable
- Pagination for query_posts();
- Having problems with paging
- How to loop custom post_type from (a) specific category(ies)?
- Do not show sub categories in the loop on archive-product.php
- How to Link to Most Recent Custom Post of Same Term
- Function to automatically rename the base category permalink
- Cannon see subcategory in permalink
- How to display the parent category if only the child category has been chosen
- Category tags with comma’s
- Redirect Changed Permalink on wordpress
- Display posts of certain categories to specific user roles
- Category url generate 404 error
- Allow user to select categories that will display in post loop
- How to remove one specific category (uncategorized) from post permalinks
- Insert HTML content in WP Query at specific point
- Custom Permalink with child categories creating 404
- How do I retrieve the category ID (ugly permalinks) in my sub-navigation menu?
- Simple way to style posts of a single category differently in the loop and in single
- How do I change the category permalink structure?
- Remove any product that is featured from regular display loop [WooCommerce]
- Two Sections on Woocommerce Catergory Page [closed]
- Getting the Most Recent Posts from Multiple Categories
- Display subcategories in dropdown
- Display category title and three latest post inside the category
- More efficient way to list posts by category [duplicate]
- Redirect year month day postname permalink structure to category postname structure
- Have posts that belong to multiple categories, exclude some categories from homepage
- Category nicename inside loop in wordpress
- Pagination doesn’t work on multiple categories
- category link not working for a specific slug, works for others
- Show multiple categories in query using redux framework variable
- Get the ID of the current post’s child category
- filter a loop base on specific category
- Problem with multiple loops in wordpress theme
- multiple values in an array for category__and does not work with WP_Query
- url for posts for a date within a category
- Limit Loop to One Category
- Display post thumbnail for specific category outside the loop
- List post only under the category, exclude child category content
- Filter Category Loop Dynamically
- Advanced permalinks structure
- Is the part “category” fixed to an URL to an archive or post?
- Pagination for a category
- Editing Loop So It Targets Specific Tags?
- prefix to post permalinks without affecting category permas
- Can I define multiple paginations on a single page?
- the_category() doesn’t working in wp_query loop
- Problem: retrieving parent category’s first post
- Category URL Management
- Category pagination not working
- How to get posts using category slug in ClassiPress?
- Category sticky latest
- Categories show 404 error on multisite installation
- Need help with major category and permalink re-organization
- Posts made to category don’t show up (do show up on frontpage)
- Exclude posts without category from loop
- How do I remove pagination from just some Categories?
- Subcategory Page URL to Display Only Posts from that Subcategory?
- Category name for all posts getting assigned to a single random post
- How to use category slug with a regular page
- Category post count is not correct
- Display all categories but only if they have posts in them that have a specific tag assigned
- Function the_posts_pagination() not compatible with WP_Query arguments
- Include last post date in get_categories loop
- Problem with pagination block in Gutenberg
- Using custom structure prefix showing 404 for sub-categories
- pagination 404 error, same slug home and categories
- How to add tags under categories
- A different permalink structure for different categories
- How to remove category name for only one category?
- How can I order all subcategories alphabetical independent of the parent categories?
- How to get specific (grand parent) category of current post?
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- How to set the same base url for two different taxonomies?