You can hook into pre_get_posts
and modify the query. Your hooked function will receive a WP_Query object as it’s only argument. You can check to see if you’re on a the correct post type archive and modify away.
Something like this:
<?php
add_action('pre_get_posts', 'wpse63675_pre_posts');
function wpse63675_pre_posts($q)
{
if(!is_post_type_archive('your_album_type'))
return;
$q->set('posts_per_page', 20); // or however many you want
}
You can drop the above in your functions.php
file or a plugin. Use with caution.
I wrote a plugin that takes care of this for you. It does the above, but with a set of fields in the admin area.
Related Posts:
- Custom Post Type Settings page, choose page to display archive
- How to get the custom post type from an archive page?
- Loading custom page template via plugin
- Pagination problems with multiple custom post type archive pages
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- WordPress custom post type archive with description
- CPT: archive-cpt.php VS custom page template
- Custom post type and taxonomy permalinks – Structure
- Navigation menus not showing because of custom post type filter
- Rewrite URL for only archive page (custom post type)
- Archive slider for CPT
- How To Create A Custom Taxonomy 404 Page
- Archive template for custom post type only lists first 10
- Change archive page template using pre_get_post
- Custom post type is showing custom home page, not archive page
- Isotope Filtering with Bootstrap Tabs – Custom Post Type Query Loop in each Tab (Have to click twice to filter)
- Why is my site using index.php instead of archive?
- Custom post type archive page blank
- My archive-posttype.php template is not loading
- Custom Post Archive is not working
- Which Template Page Should I Use?
- Display custom post types in wp_list_pages
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- How to integrate single and archive templates for custom post type in any WordPress theme
- Custom post type permalink uses archive page to display posts
- Taxonomy template page not working
- CPT with its own category and tag url
- Custom Post Type Archive template not being called
- Can’t replace the default sidebar with a custom sidebar on Custom Post Type in Genesis
- Best way for a plugin to define a custom post type archive template?
- Is possible register two archive pages for single custom post type?
- Archive page of CPT’s custom Taxonomy
- Pagination links for custom post type shows correct number of links, but links result in Page not found
- Finding the CPT archive template source
- ACF Pro Accessing fields on a Custom Post Type
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- get first limited words from a custom post in the archive page
- Iterating over custom post type archive returns incorrect first ID
- Show index and not the archive for “Dog Custom Post” with default slug
- Custom post type archive page not showing on archive-posttype.php
- Custom post type with two templates
- How do I make my archive page look like popular reviewing sites (e.g., Polygon and Gamespot) [closed]
- Display custom post type archive on page.php template
- Multiple archives for cpt, taxonomies, terms
- Making a archive gallery page for a custom post type which already has an archive page
- Get Non-Paginated Index of Post in Paginated Query
- How to assign custom post template to its custom taxonomy terms
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Archive templates based on taxonomies
- Organizing Custom Post Type Archive Template
- listing custom post type category page
- Two different archive pages showing the same content
- Archive custom template from search
- how to pass args for archive.php query?
- Pagination not working only on Archive-Name.php using new WP_Query
- How to make posts under custom post type not generate a URL / post
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- next_post_link() not working for single custom post type post
- How to set a default format for a custom post type?
- Exclude add_filter from the admin
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Sanitizing post content for use in an email
- Genesis Child and Custom Post Type
- Display “Post 2 of 4” on single post page?
- WordPress import not importing custom taxonomy
- How to make post sticky in the admin page?
- WP 4.7 broke get_post_type or requires an explicit integer value?
- Remove base slug in permalinks of hierarchical custom post type
- is_main_query() not working for WP REST API
- How can I move a custom taxonomy and its data from one post type to another?
- rewrite custom post type slug in wp admin
- Displaying the type of post (Custom) in a single.php
- If Statement – if current post is a child of a post with a taxonomy
- Get next and previous 3 posts in a term in single post page
- Register widget only page is a singular of custom post type
- Including metaboxes from custom post types in global search — continued
- CPT’s with landing page instead of archive – Url Rewrite?
- How to produce a sub-page-system in WordPress
- False Positive on has_post_thumbnail
- Custom Taxonomy not displaying all post
- When updating non-public custom post type it says “Post updated. View Post”
- How to migrate Custom Field Template to a WordPress Multisite
- Custom Post Type or Shortcode, What to choose? [closed]
- Custom post type, taxonomy and admin bar
- Creating an Events Feed with Sub Pages/Posts for Each Event
- Problem with custom loop navigation inside the blog page
- WordPress giving me the index
- How to customize custom post type’s list table?
- Custom post type defaults to index.php for archive page
- customize Dokan multi vendor: how can i set every Dokan as child of another dokan?
- Why do my custom post types stop displaying over time?
- Persist meta box choices throughout all posts of same post type
- Make pagination work as a carousel (custom query)
- Custom post type archive false is not compatible with breadcrumbs
- Single page archive – get coresponding taxonomy and terms
- Custom WordPress URL
- Custom taxonomy archive not showing posts of certain child taxonomies
- Custom Post Type Loop breaking php
- Show custom category archive as front page and remove taxonomy slug from urls
- Meta_query question