Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Archieve.php not loading for custom post type

The single.php template is loaded when you visit a post. The archive.php page is a generic archive template, loaded in case a grouping of posts (a year, a month, a category, a tag, etc.) does not have it’s own template.

Please read this about template hierarchy.

If you want to create a custom post template for a specific post_type you have to create a dedicated template and call if single-post_type.php (replace post_type with your post type, i.e. product).

Related Posts:

  1. Filtering a custom post type by custom taxonomy in archive template
  2. Why are posts from custom post type not displayed in “category” archive?
  3. Displaying category archive of custom post types
  4. How to build a complex page structure
  5. Custom Post Type Archive URL takes over page URL
  6. Template tags to display custom post type posts in category template?
  7. Regex problem in an add_rewrite_rule
  8. Custom post type archive sorted and grouped by date in post meta field
  9. get_categories for custom post type and filter by custom taxonomy (brand) and list child categories of a defined category
  10. Category page only displaying the posts from a custom type
  11. custom taxonomy archive by year
  12. need advice on how to do a lists using custom post types – taxonomy vs postmeta
  13. Should I use custom menu, C.P.T. or theme options, or something else for this?
  14. CPT Archive with core Category
  15. Custom Post Type Archive Page Filtering
  16. Custom post types and category archive
  17. List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
  18. multiple custom post type on category page
  19. Meta data (Tags and Categories) for Custom Posts not showing.
  20. Archive links for custom post types
  21. Include custom post type custom taxonomies in Categories widget
  22. Archive Template being used instead of Category Template for Custom Post Type
  23. Why does my URL keep returning 404 error code?
  24. Menu’s breaking, now showing all page links on site
  25. Advanced archive url structure (category, tag and date)
  26. How can I tell if I’m on a custom post type archive page?
  27. Display all Categories except ones with a specific parent
  28. Custom post category name showing empty
  29. Save data is post using php front end
  30. Custom WordPress theme not displaying posts from category
  31. Creating an archive page or simple template to list all values of a custom field of specific post type listing
  32. Custom Post Type archive page listing a 404 or single post
  33. Get meta values from parent post and save in child post
  34. Adding Custom Post Types to category/tag/author archives breaks header content
  35. Custom category taxonomy – archive page not showing up
  36. Help with Multi Level Category Archive Page
  37. How can I generate a list of post-type specific categories?
  38. How To Display Category list from Portfolio post type plugin?
  39. Custom Post type archives / categories give 404
  40. archive.php can’t find categorized posts
  41. Having some trouble properly displaying Custom Post Types in templates
  42. How can I set up the URL for a category archive for a custom post type?
  43. Categories in custom post types
  44. Stop header code from showing in category page?
  45. Category names on CPT archive pages [closed]
  46. Show custom post type on post category page doesn’t work / breaks navigation
  47. Separate archive template to show posts and CPT by same category/taxonomy
  48. WordPress Custom Post Type Archive, filter by category and get pagination working
  49. Is it possible to place custom post type files inside a folder in theme directory?
  50. Use post as category
  51. How to get the post type from a category id?
  52. Displaying a custom post types custom taxonomy value?
  53. How to add custom post types to normal category pages
  54. Pagination on category page with custom post types
  55. Insert HTML inside link in a walker
  56. Replace title column in post list with post meta value
  57. Custom Post Types and independent Categories – complex Taxonomy
  58. Call custom post type by category
  59. Add category attribute to custom shortcode
  60. Metadata for a taxonomy – is there any WordPress way of doing this?
  61. My theme saves their custom post type’s metadata as a serialized array, how to access the keys?
  62. Custom post types archive redirect
  63. List all images from a single post meta value
  64. Does WordPress limit the length of slug names for Post Meta or Terms?
  65. Use regular category with custom post types
  66. orderby in custom WP Query does not work
  67. Should I use custom taxonomy or custom post type
  68. Populate Custom Fields in a Custom Post Type?
  69. just can’t get date-based archives per post-type to work
  70. How to detect filter in URL in Category page?
  71. Set menu active state for custom posttype and category, given custom taxonomy term
  72. Archive page for taxonomy terms
  73. How to show CPTs in term archive
  74. How to change post featured image using a custom field of category?
  75. Custom template page with custom archives listing by user
  76. Insert Multiple Post with Same Publish Button
  77. Update CPT post meta with update_post_meta and cron job
  78. Group posts by custom post type
  79. Custom meta box data array: foreach not working correctly?
  80. Undefined Variable – Custom Post Type Meta
  81. What’s the difference between same wp functions get_posts(); functions in different form?
  82. How can i change the output of posts_nav_link();
  83. Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
  84. Display all posts in main category and 1 subcategory
  85. Replace li Items with divs with classes
  86. Ordering posts in Search & taxonomy by post_meta
  87. showing custom post types of a certain category only
  88. One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
  89. Insert post metadata for all posts in CPT at once if metadata no existent
  90. Get posts from a custom post type by child categories of a parent category
  91. Display custom post type from dynamic custom field
  92. Linking to the most recent post in a Custom Post Type
  93. Root slug of taxonomy returning 404
  94. Show the same Article Available in Other Categories
  95. how to delete all users and posts based on ‘user_meta’?
  96. Getting posts under the custom post type ui category
  97. Show category ID on custom post type
  98. How to modify archive query with pre_get_posts to append CPTs?
  99. How can I auto-assign a CPT post to category in a custom taxonomy when published?
  100. What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
Categories custom-post-types Tags archives, categories, custom-post-types, post-meta, theme-development
failed to open stream: Permission denied for WordPress plugin
disallow publish posts with special title

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress