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?
- author archives, showing all custom post types, problem on pagination
- Help Structuring Query for Archive Pages
- Conditional to modify query results
- Settings API with custom post type menu limitation
- Custom Post Type not visible on category page
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- Need post_type_archive_title function but in ‘single’
- Display custom post type taxonomies as an archive page
- get_template_part for custom post type content not working
- Good way to store content and settings for an RSS plugin
- How would I create a shortcode to display a custom post within a page or regular post?
- Display CPT description on archive.php pages for all CPT
- Output custom post shortcode. Help spot the error.
- Loop on front-page.php
- Change name of custom post type archive
- How to count custom post types with conditional operators
- When ‘is_post_type_archive()’ return true?
- Editable content on a Custom Archive page
- How to check if “is single” page
- get_template_part() – post-meta not working?
- Second Custom Post Type Archive
- How to get “custom post type”-archive with working permalink to it?
- wp_query to find posts by year and month
- WP_Query is printing out only one post when posts_per_page is set to multiple
- WP Query to displaying date and posts for that date?
- GravityForm: Populate Dropdown with custom post type [closed]
- Loop of custom post type names
- Return array of categories to php function for current post
- Link users to a custom post type
- How to get all posts except for one post from a certain custom post type?
- How to output wordpress custom tags separated by comma?