You should delete this part (as Pieter wrote):
$the_query = array(
'paged' => $paged,
'cat' => $cat,
'posts_per_page' => 20,
);
$arrgs = new WP_Query( $the_query );
$temp_query = $wp_query;
$wp_query = NULL;
$wp_query = $arrgs;
I’m supposing that you want to show 20 posts per page, you could either configure that in Settings->Reading panel in the admin or do this:
query_posts($query_string . ‘&posts_per_page=20’);
And then the query as it is.
Related Posts:
- Show posts of category in a page
- Automatically redirect a page to a category that share the same slug
- How to prevent WordPress from redirecting single page to prefixed category archive with same name?
- Page redirecting to category (IE only)
- How to check if I’m on the last page of posts?
- Display posts from the same category using next/previous post link
- How can I create a category landing page followed by pages of posts?
- Best Way to Redirect Category to Page and Hide Category
- Preventing index.php?category_name=something from redirecting
- Optimal way to redirect home page to category archive?
- Redirecting specific category posts to subdomain
- Show Previous/Next Posts navigation only inside the same category
- Loop with Dynamic Categories
- How to: 301 Redirect /category/ to /customname/
- Listing all posts from current category on page
- Show posts of one category only with Custom Taxonomy on single.php
- Archive pagination causing 404 with permalinks structure
- Custom category template pagination problem
- Force category-slug.php to show page, even if it doesn’t exist
- Redirect category to first available child post
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Duplicate Category and Page URL loads Category instead of the Page
- Add a specific category at a specific place to the menu that uses wp_list_pages
- Viewing category pages without the word ‘category’ in URL
- Categories vs. Page Site Organization
- Pagination Not Working on Category.php page
- Broken category pagination
- ?cat=-1 Indexed Versions Of Homepage
- Changing permalink from /postname/ to category/postname/
- Hard coded main navigation
- Pagination for category slug returns 404 when page >= 2
- How to make 2 tag feeds show up on 1 page?
- Why do my categories redirect?
- Search in custom post type AND in pages with category
- Pagination is not working properly in Product Category/Tag pages
- Restoring default article pagination on archives – Removing custom limits
- Paging not working in category.php
- How do I toggle pagination on/off in search results and category listings via a link?
- Give a page priority over a category that has the same name?
- Sub Categories Keep Redirecting to Pages With Same Slugs
- Custom post and category template pagination problem
- Different banner for different section
- Custom category URL rewriting
- Should I use “Categories ” or “Pages” for a WordPress Static Site (A non blog site)?
- Category template with pagination returns 404 on next pages
- Redirect single article permalink to paginated category page
- How to display numbered pages in a category
- How do I display something on a particular category page?
- WordPress alphabetical A-Z custom post type post result display
- How to create a subcategory to a PAGE on WP?
- How to show 1-5 of X Total Results
- Get the ID of 10 Latest Pages stored in a WordPress Category
- How to show 5 posts from specific category on related page?
- How do I get category and page ID’s?
- How to put page numbers with the next/previous on a post/category list?
- How can I display tags as categories?
- Trying to create a Categorised Index (archive?) to use as my Home Page
- “Virtual category page” based on a custom field filter
- Group search results by category
- Getting the Most Recent Posts from Multiple Categories
- Use blog as base for tags and categories
- Pagination doesn’t work on multiple categories
- Category link redirect to custom template page instead of index.php?
- Redirect depending on category chosen
- Pagination breaks on child-categories, works fine on parent-category
- Pagination for a category
- Conditional category query breaking?
- Need help with major category and permalink re-organization
- How do I remove pagination from just some Categories?
- How to use category slug with a regular page
- display specific category when website loads
- pagination 404 error, same slug home and categories
- OK to redirect the root WordPress category slug?
- Pagination for custom categories template
- Template category.php with page (no posts)
- Showing the category hierarchy as clicked in WordPress, with image and desc
- Unable to create pagination for Category.php
- “Next posts” of a category do not call category.php
- Adding a category view to a page
- WordPress Category url redirects to subdomain
- How to add Pagination to foreach loop to page
- WordPress pagination not working because of subcategory
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Getting page/category content to show up in my custom page template
- Category foreach Paging
- Transfering static site to wordpress and retaining category by month paginations
- htaccess redirect for all categories converted to tags now showing 404
- date.php shows all posts. how to fix it?
- wordpress category.php query for featured news item, broken pagination and repeating posts
- Paginating a list of all posts collected by category titles
- Return selected categories only in custom page meta box?
- Paginate WordPress Category Pages
- Need help with category page customization meeting certain condition
- Show custom menu in category and its posts
- Showing one post from each category, paged?
- Can i know if it is Category first page or 5th?
- Exclude posts from certain category breaks custom pagination
- i want to add pagination list of categories
- Link to page in category
- How to display posts by author in a separate page, other than author.php?