No there isn’t, and it isn’t necessary. Post type names are their own unique identifiers.
The primary reason there are no numeric IDs is because post types are registered on every page load in PHP, no table exists in the database for them, which means no row IDs. So there is no use for a unique ID that the post name doesn’t already accomplish.
For this reason, you’re perfectly fine to use the post types name in your ID attributes, post type names can’t clash.
The same is true of taxonomy names, 2 taxonomies cannot share the same name.
Related Posts:
- Shortcode in excerpt
- Where to put my code: plugin or functions.php?
- Custom post type pagination 404 fix?
- Create a shortcode to display custom post types with a specific taxonomy
- Per Post Type Revision Numbers
- Get list of all registered post types slugs
- Add Content to Page without shortcodes
- How do I implement custom fields without using any plugins?
- How can I fix those issues generated by the Themecheck plugin
- custom post types don’t appear in RSS
- Shortcode Displaying Custom Post Types
- Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy
- Registered Post Type Isn’t Showing in Admin Menu
- Custom Select Query with Custom Post Types
- IF statement in a do_shortcode
- Strip shortcode from specific post types (formats)
- Multiple post type queries (with specific arguments for each)
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Make slug as ID Number for custom post types
- Get custom posts with certain ids in a custom loop using a shortcode
- Custom Post Type Loop within Shortcode
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- How to enable shortcodes in a custom post type?
- Get custom fields from a custom post type with a shortcode
- Get custom post type list for every category shortcode
- Incorrect post_type in url of taxonomy term
- Form action/link to render a plugin in WordPress front-end
- custom post type category count shortcode
- Display Child Pages of Custom Post Type Parent Page
- Shortcode to display Staff post type based on Location post type and Specialty post type
- wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
- How to define which register_post_status goes to which register_post_type?
- Foreach inside shortcode not working as planned
- Is it possible to filter the display name for post formats for display in the Formats meta box?
- How to retrieve category of a post in have_post loop?
- single-{post_type}.php not working
- How to Set Taxonomy Object Description?
- Show only public custom posts in home page
- the_post() is printing titles in page footer
- retrieve permalinks of posts inside custom post type by using post ID
- Can I change my post type to anything and my site still work?
- post_parent in custom post type
- Custom filter for main search: how to exclude specific post_type from search results
- Add custom attributes to a post
- Filter content in shortcode
- Shortcode with WP_Query more than once on one page
- How to call a post’s metadata in shortcode.php?
- get_post_types not working properly in admin
- Trying to write shortcode with get_post_meta but isn’t working
- Shortcode / WP_Query in post changes context
- Give a unique ID while saving
- Modify a plugin function output from another plugin
- Problems making shortcode with custom post types and taxonomy
- Using Custom Post Meta Values in Shortcode
- Content in WP Editor displayed below CPT shortcode [duplicate]
- How to make post templates to include shortcodes only?
- Why is my custom post content only viewable when signed into WordPress?
- How to show Custom Post Type – Case Study using Shortcode & ACF
- Alike Shortcode using in Custom Shortcode
- How is possible to know ID of taxonomy-{taxonomy}.php page for ACF fields
- Display CPT Category List as Shortcode
- Can Someone help me to create Short Code for displaying a category posts
- Shortcode with loop stacks output
- background featured image display using shortcode
- How to display the post using a shortcode in WordPress?
- Get all post types that supports tags
- WordPress shortcode to pull product post data
- How to generate auto shortcode for custom post type same as Elementor Template?
- Button link display in shortcodes using custom field in ACF
- Shortcode and get_template_part
- Custom post type single with custom URL structure
- WordPress post not executing shortcode until updated
- Do not parse shortcode in CPT
- Display result as “prefix+ID” and show in the search result as bookcode
- Custom post type post_type_link gives “page not found” on any other custom post type
- Extracting Post ID and passing through as an attribute in a shortcode
- Post types showing tables…Can I do that?
- Enable shortcodes on custom post type
- Custom meta box in editor of custom post type not working
- Getting wrong ID
- do action inside a class is not working
- Updated from 3.8 to 4.2 and all post types changed to “post”
- Plugin Error on activating
- Pulling in Related Posts based on Post Type array
- Ads below footer
- Modify shortcode to work with custom taxonomies and slugs
- Custom Info Box at end of posts?
- Shortcodes in custom post fields without the_content()
- Shortcode display CPT Query only showing 1 post?
- Using get_terms() as shortcode attribute
- shortcode for recent custom type post
- How to add post type in masonry posts elementory widget
- Navigation links to posts in current term shortcode
- Rewrite a filter as shortcode (or something like that) to use anywhere in CPT
- Display posts from another page on home page in wp-editor
- How to loop through a custom post type using a shortcode and output each element in the loop using shortcodes
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Filter page ID outside the loop and order
- Problem with shortcode
- Custom post type REST api 404: Updating failed. No route was found matching the URL and request method