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
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Display all posts from all categories with pagination
- Preventing index.php?category_name=something from redirecting
- Add forward slash on categories url (serve one version of a url)
- Multisite blog converting categories to subdomains
- Get page content by category or tag
- 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
- Category page showing posts from all categories
- Loop with Dynamic Categories
- How to: 301 Redirect /category/ to /customname/
- How to? Redirect /category/sci-fi/ to /category/scifi/?
- Create a full width responsive header image per page
- Remove child products from woocommerce category page [closed]
- Using same slug name for a page and category
- Remove “Category Archives: title” at the top of a category page [duplicate]
- Redirecting category link to first child post
- Page navigation within a category
- How to have a static category/author page?
- Listing all posts from current category on page
- Show posts of one category only with Custom Taxonomy on single.php
- I use same slug name for category and page
- Pagination on child category returns 404
- Disable pagination only for specific category
- Page with the same name of a category
- Archive pagination causing 404 with permalinks structure
- Custom category template pagination problem
- How can i call an article from each category and still paginate properly?
- WordPress removes spaces in URL on pagination
- Show pages and articles in category search result
- How to create taxonomy values for pages and list them in wp-admin
- 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
- in_category() works in single.php but not in page.php?
- Categories vs. Page Site Organization
- Pagination Not Working on Category.php page
- How do I automatically put categories and their descriptions on a WP Page?
- 3 Columns, 3 Categories, One Archive, and Pagination
- Broken category pagination
- ?cat=-1 Indexed Versions Of Homepage
- editing fonts of category links from the_category() funtion
- Is it possible to restrict viewing of category PAGE to logged in users only?
- Redirect category to url with /category
- 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?
- WordPress category page redirects in .htaccess not working
- Why do my categories redirect?
- Pagination not visible on woocommerce’s category page
- 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
- The default code for “posts_nav_link” on category.php isn’t working
- Why category.php throw 404 in wordpress while calling paginate_links()?
- WP didn’t redirect to canonical category URL
- Paging not working in category.php
- How do I toggle pagination on/off in search results and category listings via a link?
- posts_nav_link(); picks up index.php instead of category.php as template
- Give a page priority over a category that has the same name?
- Multiple URL’s based on category for one post
- 301 (static page instead latest posts)
- category permalinks
- How to “group” (categorize) the Pages together?
- Multiple Loops on category.php with pagination on last loop
- Sub Categories Keep Redirecting to Pages With Same Slugs
- Custom post and category template pagination problem
- Different banner for different section
- How to make the link to the category for a post go to corresponding page number in archive?
- Custom category URL rewriting
- Category archives with monthly pagination
- Putting a Category of posts under a Page
- category pagination got broken suddenly
- How can you change the permalink for pages?
- redirecting from a general category page to another specific one
- Pagination for ajax category filter
- Should I use “Categories ” or “Pages” for a WordPress Static Site (A non blog site)?
- Category template with pagination returns 404 on next pages
- Category.php loads first before page.php?
- How to insert category list into post creation page, and retrieve chosen categories?
- 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