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 can I create a category landing page followed by pages of posts?
- Custom permalink structure leads to be 404 on pagination
- Should category.php and The Loop be used if the query needs to be customizable?
- Exclude the category from the WordPress loop
- get_field not displaying my custom field value
- Randomise results from a category page?
- How to get the url to tag & category base set by the user?
- Show div only if post is in specific category
- How to show a category post to a specific registered user
- How to Include the Parent and Child Category in the Permalink if the Post is Added to Both
- Root level category, tag, author and archive pages to work
- Display one latest post from multiple categories
- How do I get the total number of categories in a list of search results?
- WooCommerce change category url and product base
- Display products for a category, sorted by post_excerpt
- a-z list, categories and sub categories in loop
- Pagination Not Working on Category.php page
- Broken category pagination
- How to loop only categories without posts (+ show category featured image with acf) [closed]
- Additional featured post on first page
- Show all posts for a specific category/author
- Add “page-a” slug to category link if user visit category link from “page-a”
- create a page which displays a list of categories title+ short description?
- Changing permalink from /postname/ to category/postname/
- Query Posts Exclude Entire Category
- Pagination for category slug returns 404 when page >= 2
- One Specific Category To Permalink
- Pagination is not working properly in Product Category/Tag pages
- Paging not working in category.php
- How do I toggle pagination on/off in search results and category listings via a link?
- Custom post and category template pagination problem
- Inside a loop, how to change CSS class based on category name?
- Remove the parent name from permalink
- Category template with pagination returns 404 on next pages
- Categories list loop – add separator every 3 categories [closed]
- Redirect single article permalink to paginated category page
- How to display numbered pages in a category
- How to show 1-5 of X Total Results
- Hierarchical permalink structure for posts showing categories and sub-categories
- Trying to get variables in hacked category dropdown
- category__not_in and id values from variable
- Do not show sub categories in the loop on archive-product.php
- Cannon see subcategory in permalink
- Allow user to select categories that will display in post loop
- Insert HTML content in WP Query at specific point
- 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
- Show multiple categories in query using redux framework variable
- Limit Loop to One Category
- Filter Category Loop Dynamically
- Is the part “category” fixed to an URL to an archive or post?
- the_category() doesn’t working in wp_query loop
- Category name for all posts getting assigned to a single random post
- pagination 404 error, same slug home and categories
- How can I order all subcategories alphabetical independent of the parent categories?
- Custom Loop with certain number of one category
- Get multiple category names from permalink
- Template category.php with page (no posts)
- Include a page’s “category” in its URL
- Wrong category in URLs accepted like the correct one
- Remove base category gives 404 error
- Custom permalink /%category%/%postname%/ produces 404 on each post
- WordPress Category url redirects to subdomain
- Querying posts from two different categories while looping inside another loop
- How to add Pagination to foreach loop to page
- Loop doesn’t work
- WordPress pagination not working because of subcategory
- 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
- /blog/ permalink prefix causes category pages to 404
- 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
- Paginating a list of all posts collected by category titles
- Paginate WordPress Category Pages
- Change next_post and previous_link to navigate throught parent categories only
- Custom loop by url
- how wordpress generates permalinks as /%category%/%post%/
- Multiple Parent Category URLs
- IF have_posts contains posts from a certain category
- Link to page in category
- WordPress how to remove parent slug from category URLs