Custom template should be archive-gallery.php
instead of archive-posttype.php
It’s archive-$posttype.php
where $posttype
is the custom post type slug.
WordPress first looks for archive-$posttype.php
and if it’s not available then chooses archive.php
Update
Same for the custom taxonomies also , the flow is:
taxonomy-$taxonomy-$term.php --> taxonomy-$taxonomy.php --> taxonomy.php --> archive.php
So for gallery_categories
custom taxonomy use taxonomy-gallery_categories.php
Related Posts:
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- Custom Post Archive is not working
- Archive page of CPT’s custom Taxonomy
- Custom Post Type Settings page, choose page to display archive
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- How to get_queried_object on multiple objects?
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Hide child term posts on parent term pages
- Posts per Page on custom Taxonomy Template
- Post type archive page not working
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Archive page for taxonomy of custom post type
- Should I change these content meta types before building complex archive page?
- Getting taxonomy terms used by custom post type
- Archive or taxonomy pages not working for custom post type
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- How to create archive page for taxonomy terms within custom post type
- WordPress custom post type archive with description
- Custom post type and taxonomy permalinks – Structure
- taxonomy template for custom post type the same as the archive
- Display only post types that are direct children of the current taxonomy
- How can I filter by taxonomy on a custom post type’s page?
- How To Create A Custom Taxonomy 404 Page
- Custom template won’t load for a custom post type (custom permalinks used)
- Custom post type templating problem
- Custom post type is showing custom home page, not archive page
- Create template for taxonomy results limited by Custom Post Type
- Extending AZIndex plugin to use custom post types and custom taxonomies
- Use Custom Post Type archive page for the taxonomies term archive page
- Display custom post type category, while in a CPT category, then the posts beneath
- Number of Custom Post Types published are not being shown in the custom page
- Custom post type archive page blank
- posttype/taxonomy/term archive page 404 error
- My archive-posttype.php template is not loading
- What’s the name of the custom post type yearly archive template?
- Which Template Page Should I Use?
- Alphabetically sort a taxonomy.php template by post title
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- How to integrate single and archive templates for custom post type in any WordPress theme
- Permalink problems with custom post type and custom taxonomy
- sort CPT on Custom Taxonomy Archive page
- Use the custom post type archive for taxonomies?
- Custom Post type date archive for custom taxonomy
- Show categories of custom post type and not all posts
- Taxonomy template page not working
- Custom Post Type Archive template not being called
- Query Posts that have Custom Taxonomy
- Custom Post Type Custom Archive Page Not Working
- Getting custom taxonomy posts on archive page
- Archive page for custom post type and custom taxonomy
- Custom post type category permalinks and archive pages
- Displaying custom taxonomy menu in custom post type archive
- Is possible register two archive pages for single custom post type?
- Getting Same Description in All the Custom Taxonomy Posts
- Finding the CPT archive template source
- Displaying all posts by category and showing content on click
- pagination problem listing custom post types of taxonomy in wordpress
- Posts per Page on custom Taxonomy Template
- ACF Pro Accessing fields on a Custom Post Type
- Static Front Page not working for custom theme
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Building Link List for Custom Tax
- Custom taxonomy with custom post type archive page
- Custom Post Type / Taxonomy / Term – what template to use to avoid 404-page?
- get first limited words from a custom post in the archive page
- Custom post type post_type_link gives “page not found” on any other custom post type
- Custome post type “tags” pick default archive instead of custom post type archive
- Customize url from the_terms
- Custom post types not displaying per category
- Help with Multi Level Category Archive Page
- Show index and not the archive for “Dog Custom Post” with default slug
- 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
- Custom taxonomy in custom post type archive with pagination
- Pagination fault in custom post type archive page [duplicate]
- 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
- Why is this custom post type defaulting to archive.php?
- title tag for custom post type remove taxonomy name from title tag
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Custom taxonomy archive page not routing?
- Archive custom template from search
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Pagination not working only on Archive-Name.php using new WP_Query
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- WP_List_Table Inside Metabox Not Working on Submit
- Is there any performance consideration when using Custom Post Types?
- Permalinks not working for custom taxonomy on custom post type
- custom types taxonomy hide_empty
- How to rewrite url for any specific taxonomy?
- How to rewrite the post slug of a custom post type post
- Getting List of child terms from custom taxonomy parent
- Specific template for subcategory of custom taxomy
- Show custom taxonomy not in submenu
- Custom Post Type urls not working