I think something like this should work:
add_action('parse_query', 'wpse32932_parse_query');
function wpse32932_parse_query( $wp ){
if( $wp->is_post_type_archive ):
$wp->query_vars['posts_per_page'] = 30;
endif;
return $wp;
}
Related Posts:
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Archive page…limiting posts per page
- Date archives for custom post type
- is_singular won’t call my functions?
- List events by month
- Custom post type loops with different page templates
- How do you output custom code between posts in the loop?
- How to append element after thumbnail
- How to list custom post types?
- Display custom field of specific post where post title matches variable
- Create a random unique 6 digit number as custom field for custom post type
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Very Slow Page – How to Optimize # of Queries?
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- Custom Post Type Loop throws 500 error when used in widget
- How to make sure content doesn’t display if selection is empty
- get the custom post type title/name
- CPT + CMB2: data not displaying for only first post in loop
- How do i calculate the total of values of custom fields in custom post types?
- I would like to have different styles for my posts based on the content of each post
- Checking if Post Title is Unique as Loop Criteria
- Custom post type – get_day_link()
- Custom Tag Description unable to display just below and outside of the Loop
- The loop seems stuck to a single (now deleted) post
- Including all post id’s of a custom post type into an array
- How can I group posts by months and years?
- Trying to Create a PHP Variable for post_type that can be referenced Site Wide
- Loop increase number
- Using wp_query to modify the loop in index.php for a CPT
- Control content before and after custom post type loop
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- How do I add custom HTML to the content of an archive page’s posts?
- Get data from PHP to JavaScript to set position of each post on front page
- foreach loop inside the loop creating duplicates in output
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- Creating on-page options for Custom Post Type
- WordPress sitemap with Custom Post Types
- Show the categories the current post has
- Fetch data from two custom post types and create multidimensional array for output to html table
- Page that lists publications by classifying them by taxonomy
- CPT loop doesn’t seem to account for post date?
- Pagination not working in custom post type. Help
- when looping through custom post data not appearing
- Accessing download link from the loop with WP Download Manager Pro
- Custom WordPress theme not displaying posts from category
- Custom Post Type has wrong label and is not found when called by a loop
- Combine multiple separate lists into one
- Do not show child pages within a file page
- Looping to organize and display custom posts by category using PHP and WordPress
- Tell wordpress to show a single page instead of an archive page
- Show parent category and subcategory once in while loop
- WordPress trying to query two custom types to get child from the parent
- Add active class to foundation 6 tabs while looping categories
- Display related post content and custom field content
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- Strange behavior on WP_query
- get_post_meta for Custom Post Type ( CPT )
- WordPress query posts by custom post type not workng
- WordPress Custom Post Type and sort by Tags
- Posts without featured image using other post’s featured image
- Order by custom field attribute
- Looping taxonomy in taxonomy?
- Stop header code from showing in category page?
- is_singular won’t call my functions?
- Query Custom Post Type by Tag
- How do I filter a custom post type loop by a field?
- How can I remove the “Add New” button in my custom post type?
- Setting up custom post type archives in WP3.1? Any luck?
- How to show more posts on an archive page?
- How to let custom post type posts show in standard post archive (like in homepage)?
- How to display the rest of categories on Portfolio filterable
- Get_post_meta() won’t return value
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- get_template_part for custom post type content not working
- Creating Accordians in WordPress Theme
- Display different content on homepage depending on post type
- just can’t get date-based archives per post-type to work
- What’s the difference between same wp functions get_posts(); functions in different form?
- WP_Query orderby modified to include custom meta changes
- Can I list a custom post type within another custom post type in the admin area?
- Custom post type multiple loop by taxonomy term
- List custom taxonomy specific to one custom post type
- What’s the WP way to load remaining custom posts?
- Custom archive page for CPT UI
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- WordPress: Custom User Role cannot access Custom Post Type | “Sorry, you are not allowed to access this page”
- Display post from custom post type
- Custom post type pagination error
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- How to only get the content of post page while looping?
- ACF meta_key and meta_value break loop
- Staggering featured post using ‘sticky’
- next_posts_link() always generates second page link on custom post type
- Stop Custom post type from being searched via URL
- WordPress custom field images not getting inserted into array
- Show search for data extracted from metabox
- WordPress post objects in one parent post object