Did you try
$query = 'posts_per_page=3&cat=3';
?
Related Posts:
- Posts with at least 3 tags of a list of tags
- Get post count of current loop when using multiple queries on one page
- Use WP_Query with a custom SQL query
- How to query for a week using key => value WP_Query argument notation?
- Pagination not working for Custom search form & custom result template
- How to use filter hook posts_join for querying taxonomy terms in posts_where?
- WordPress altering my custom query, How to fix it?
- Looping through tabular data
- Using next/previous_posts_link with customised search
- How to create/modfiy WP_Query to search in post title OR custom field?
- Display featured products through custom loop in WooCommerce 3 [closed]
- How to detect custom query inside `posts_where` hook?
- Is temporarily overwriting $wp_query a bad idea?
- Array Chunks and Inserting Varying HTML in WP_Query
- Filter user list that meta_value is empty
- Query wp_usermeta alongside wp_users
- How to output different posts per page?
- Modifying the Search Results
- WP_Query times out
- ACF – Get lowest & highest value from field
- What format does the meta_query TIME type require?
- Offset Page Loops and Pagination
- How to find a post id using the post_excerpt?
- wp_query add arguments using array_push if variable met
- tax_query: Order by slug?
- reducing the amount of wp_query calls
- WP_Query filter and order by meta ordering by wrong joined table
- WP_Query last five posts, simply ordered by meta_value
- WP_Query “OR”: Find posts by ID, Name or Post Title?
- Querying A Post That Includes Two Taxonomies Using JSON Rest API
- WP_Query condition affects posts_per_page count
- Order by title without taking into account ‘the’
- Set global $wp_query/$post variable for dynamic page generation
- Display tags with random thumbnail from selection of posts with that tag
- slow WP_Query for non-admin user
- Changing sort order for presentation by Jetpack infinite scroll
- How to search for posts given post_content AND post_excerpt using WP_Query?
- meta_value_num not ordering all items
- Meta Queries – should nesting work after WP 4.1?
- WP_Query Attachment adds additional attachment count and need to link attachment to post url
- Does the WP_Query ‘private’ argument for post status only apply to privately published content?
- Query most popular terms by taxonomy over 2 week period
- Is there a better way to pull in custom content without querying posts?
- WordPress | Date not always appear [duplicate]
- WordPress posts for multiple years
- Filter posts by comparing custom meta value against postdate
- Query posts that contain video?
- Multiple Rows in a using wp_query
- “paged” in WP_Query returns 0 posts
- How to show one post different from the rest?
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- Count posts per taxonomy else change taxonomy if less than x number
- Combine 2 arrays in a query parameter
- Add ACF field in a query
- Set front_page programatically after user login via query, while leaving site option alone
- Change AJAX filter from POST to GET for URL Parameters
- Running multiple WP_Query
- Check if searched number is within the post meta value
- How to split a post and intercalate elements from a loop
- How to echo woocommerce category name
- Find all product ID from array of customfield
- How to create a widget like this?
- How can I update post meta inside a WP_Query loop or the WordPress loop?
- Printing a variable inside a custom WP_Query
- Notice thrown when creating numeric pagination on custom query
- and tag not working
- Creating attachments archive in tags and categories
- How to get pages of parent (non-recursive)?
- Can’t get term id for category archive
- Show X taxonomies of the latest published posts
- Combine query in WP_User_Query()
- Nearby locations using Advanced custom fields, maps?
- Custom wp_query inside a conditional stament inside a template part doesn’t work: why?
- Check the stored / cached WP_Query with transients on post change
- New template file does not load category-specific post
- How to create better WP_Query to look for date time which is anywhere between two meta values?
- How to get_comments() ordered by date and parent?
- WPQuery loop not giving expected output
- WP Query filters active on wrong query
- Not able to fetch woocommerce variation sales products for particular category products
- Global page ID variable empty error
- WordPress tax_query ignoring relation OR
- pagination functions are not working
- Gather same custom field values in one value in a select tag with wp_query
- Wrap group of wp query posts to parent div by date/year
- Continue loop after $queryObject
- Order Posts By Youtube Views
- WP Query with sticky posts and tax_query
- Declare inline background image in functions.php
- WP_Query for attachments without duplicating post_parent and displaying tagged image
- Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]
- loop through custom post types with meta data
- Looking for a way to exclude frontpage and nav menu from query filter
- Using Query In Post Type Archives
- Query posts by custom fields
- WP Query Obj: Set value to be unequal | Hide media by admin
- WordPress pagination returns the same posts
- Display Featured image from custom post type category (custom taxonomy) wise
- new WP_Query with order args – no more distinction between categories
- How to make OR condition in WP_Query