Custom page templates are for pages – not post type archives 🙂
Naming your template file as archive-projects.php will cause WordPress to select it for your Projects archive page.
You also don’t need the /* Template Name: Projects */ in there, as this template naming is default WordPress behaviour. See the visual overview of the template hierarchy to understand how you can name your template files so WordPress will select them.
Alternatively, if you are wanting to replace the default WordPress custom post type archive with your own page, just ensure your page has the same slug as the custom post type – in this case, that would be projects. You can change the slug of the page at the top of the post editor, just under the title.
Related Posts:
- What is singular.php?
- What are the differences between custom post type and custom page templates?
- Page Template as Custom Post Type Archive
- Add Content to Page without shortcodes
- Loading custom page template via plugin
- Ordering Posts List By Taxonomy Terms?
- WordPress keeps fetching the archive page instead of the template page
- How to add custom template in plugin?
- How to quickly switch custom post type singular template?
- How to use a dedicated template for the Custom Post Type from a plugin?
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- Assign Page Template Within A Custom Post Type
- Custom post type archive and single.php files not working
- Page Templates – this code only works for one Custom Post Type
- Custom Post Type – Archive page title
- WordPress custom post type Single.php?
- How do I create a custom post type for a training CMS in WordPress?
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- How do I create a page template to display a custom post type?
- Custom Post Type slug same as page name causing a conflict
- Control Custom Post Type template from a plugin
- Detect if 1st, 2nd or 3rd level custom page?
- Create second custom 404 page for selected post type
- is_page_template not working as expected
- Hyphens instead of Underscores in Post-type Archive Template Filenames when Post-type handle contains underscore
- Help with CPT template pagination
- Page Templates Drop Down Select for Custom Post Types
- Can I make WordPress use a custom template for a child page
- Create Template for Custom Post Type same like for Page
- How to load a template without it being assigned to a page/post?
- Custom template with CPT doesn’t display on frontend
- create a template page for a post
- Custom post type archive page template
- Custom Post Type with Templates using Meta Boxes?
- Posts are duplicating on wp_post_update
- Custom-Posttype & Custom Taxonomy WP_Query
- Page template with different page and post content
- Custom page sidebar using Template dropdown box
- Adding sidebar to template creates horizontal gap the size of the side bar
- How to render a custom post type template with custom fields using shortcode
- Custom Post Type Template Alternative
- General advice on addressing content-centric pages
- next_/previous_post_link() `in_same_category` appears to fail when true
- Multiple templates for single custom post type
- How do you create a custom template to display a category with an image and related posts below?
- WordPress Custom Search by post_type
- Pages Become “Archive” Instead of Using Page Template
- Custom post type pages return 404 page?
- Multiple single templates?
- Custom URL redirect in WP
- Associate page w/ specific single post template?
- Include php on a specific page template
- page template for custom post type
- Page Template Dropdown For Custom Post Types
- How to integrate single and archive templates for custom post type in any WordPress theme
- providing access to post_id or post inside functions.php
- wp_get_canonical_url showing first url of the post for custom page
- Custom page for editing custom post type on frontend based on url
- How do I display child post types in the parent post type template
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Custom permalink structure for remote content pages
- Mixing Custom Post Types and Page Templates in WordPress 3.7.1
- Custom Post Type Template Insert not working properply
- Loop and add Specific Categories and Products Images
- Custom Post Type page template doesn’t show up
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- Problem with custom loop navigation inside the blog page
- WordPress giving me the index
- How to use pre_get_posts on archive page custom post type
- Can I automatically assign a page template to a custom post type (i.e page-slug.php file)
- Virtual page and loading template
- Custom Post type dont use custom page template (slug is not right)
- How to change Elementor Template for Single Page Post on Load
- A certain theme is forcing it’s singular post layout
- How to create additional rendering for custom post types?
- Set a template on a custom post in the plugin
- How can I use a custom template to load custom post type posts based on a post_meta value
- Showing Custom Post Type with his templates on a custom page template
- Question on templates
- Custom post type option page template
- Custom post Query and WordPress Post Query Clash
- How can I load Template file from wordpress plugin
- How can I find out what template is my custom post type using?
- Search custom post type result in same template page
- WordPress custom post type and page
- Ordering Posts List By Taxonomy Terms?
- Loading a template for a URL pattern
- Custom Homepage As Single Page or Custom Post Type?
- Templates list in “Page Attributes” metabox is inaccurate
- Nested custom post types templating
- Custom Post Type & Page Template
- Using custom post types within a section of a template
- How do I paginate a custom post type listing on a custom template page?
- Custom Post Type order Title ASC
- get tags from custom post type
- Custom Post Type Template Based on Page Slug?
- using a template for more then 1 page
- display related posts based on the PAGE TITLE
- I want to show a list of posts under specified categories
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs