there is an is_post_type_archive()
function https://developer.wordpress.org/reference/functions/is_post_type_archive/ that will tell you if you are on the https://example.com/projects/ page.
In your case you would need to use it like this
is_post_type_archive( "projects" );
since “projects” is your custom post type name.
Related Posts:
- How to use a custom post type archive as front page?
- How to get current get_post_types name?
- How to rewrite URI of custom post type?
- get term archive url / link
- How to get the custom post type from an archive page?
- Get term slug of current post
- Set posts of a custom post type to be private by default?
- DOING_AUTOSAVE function in wordpress
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- The Operator “NOT IN” Does Not Work In tax_query
- Ordering posts having multiple post-meta date fields
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Admin Post Update Redirection to Posts Screen
- Why is get_post_format() for “Standard” returns empty
- Page Templates – this code only works for one Custom Post Type
- Get multiple custom type posts at once in edit.php?post_type request
- Disable revisions for a specific post type only?
- How to get the parent’s taxonomy?
- How do I redirect all 404 errors of a specific post type to another URL?
- Priority of Meta Box for Custom Post Type
- Using previous_post_link and next_post_link to wrap around post sequence
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- How to save the checked boxes?
- Custom Post Types – How to include custom fields
- Enabled Revisions to existing custom post type not working WordPress
- Disable dragging of metaboxes in custom post types?
- Replacing the title in admin list table
- Get URL for specific post type and current tag
- template_redirect not working, apparently for no reason
- Adding paged query to custom URL rewrite
- Structure for projects and clients
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- How to achieve representation of streets index with custom taxonomies
- Search Custom Post Type Custom Fields
- Optimised Code for Pulling Taxonomy Posts
- Prevent authors from creating new posts of specific custom-post-type
- How can I get the first 50% of all posts (within a custom post type)?
- get_terms showing all categories instead of the ones assigned to a specific post
- Move custom post menu to under plugin admin menu
- Group posts by custom post type
- Loading custom content type from ajax results?
- Plugin: register custom post types, child ready and performance best practices
- How to set up an entity (post-type?) with many dependent entities (more post-types?)
- Is using taxonomies the way to go here or would custom post types be better?
- Add custom image size for custom post type or taxonomy
- How to use load more custom post type data normal or according to on click category tab In WP
- ACF Field on CPT Slug
- Allow duplicate slugs for custom post type with taxonomies
- Default post tab showing twice in admin bar
- Pre-selecting the category for a custom post type
- Custom post type archive pagination 404
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Displaying custom field according to date
- How to display author post count for multiple custom post types?
- Extracting Address from Custom Post via Javascript for Google Maps API
- Custom Post Types — $args vs. labels array
- custom post for slider
- Multiple pages per post (not pagination)
- Confused about Custom Post Types
- Sortable column containing numeric values for Custom Post Type at WordPress Backend
- Listing all post from different custom post type for the logged in user
- looping though custom post types and only return results in a given taxonomy
- custom fields cannt be seen with version 3.1
- widget_posts_args not using the number of posts in widget
- Copy order items with metadata between orders – Woocommerce
- Get current user id
- Pagination for custom post types – url rewriting
- Add data to post edit page, when post is published
- How can deregister scripts for a certain custom post type?
- Custom posts – tag pagination
- Getting custom post types to properly display alphabetically
- Custom Post Type Specific Post Template
- Thumbnails Not Generating
- One post auto attached to many another items
- Submit Custom Postypes from frontend
- Display custom post types by category
- How to display posts from a certain category in a bootstrap 5 carousel loop with multiple items?
- background featured image display using shortcode
- Define multiple prefixes for custom post type
- How to get custom post type with dynamic ID
- Query custom post type and custom field by URL parameters
- Order archive custom posts by taxonomy term [duplicate]
- How to add pagination to a post loop in a custom BuddyPress tab
- Update 2 wordpress tables at once
- Problem displaying posts for a category in a custom taxonomy
- Querying, storing, and using data from 2 separate custom post types
- WordPress custom post type queries
- How to display data with pagaination on backend?
- Edit post meta direct from post.php?
- Load different template for CPT (in loop) in my plugin?
- getting issue with custom advance fields plugin
- Cross post type parent page added parent page to permalink but give 404
- Change the text on the Publish button
- Why the custom post type links don’t work if not login?
- permalink structure for single-{post-type}.php in wordpress
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- register_post_type comment is not working
- show the most recent date of all posts to display on front end
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- WordPress post objects in one parent post object