As per comments the single view of your CPT will be handled according to template hierarchy. Within appropriate template you can use template tags normally, so simply get_post()
without arguments will get you a current instance.
It is a little more tricky if you want to refer to a specific post in code outside of its context.
The most reliable within custom site is hardcoding its ID. Personally I also use get_page_by_title()
(despite name can work on arbitrary post type) which is easier for human to read, but depends on title staying unchanged.
Related Posts:
- Marking future dated post as published
- Custom Taxonomy as checkbox or dropdown
- how to group custom post types
- Page as child in custom post type slug?
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- How to quickly switch custom post type singular template?
- Post metadata deletes itself
- Get latest 4 post on a custom post filtered by category
- How can you use custom types/taxonomies? [closed]
- Get child terms of current term of the current post
- Allow duplicate slugs for posts on Custom post type in different categories/taxonomy?
- Assign category to front end post
- Remove Post Page “View Post” Link
- Turn query string to sub page
- WordPress Template Hierarchy
- Taxonomy structure of Sport site
- How can I add a column in the wp_list_table of the admin area?
- How does the $post_type global variable work?
- how to check if custom post type exists in wordpress
- Custom post type custom taxonomy archive page name
- Archive slider for CPT
- Unable to retrieve any posts of CPT in wp-admin
- Custom Page that comes with preloaded content for the user
- Automatically update custom field in all posts of a custom post type
- Custom post type not showing in admin menu
- Custom taxonomy in custom post RSS feed
- Custom post type templating problem
- How to set up a post word limit for a custom post type
- Custom Taxonomies not appearing in Admin
- How to create custom post type like Page
- Notice: Undefined index: error and understanding wordpress
- Can taxonomies of custom post types be used with category actions?
- Add custom field to Posts and sort by it
- 404 error when navigating to a taxonomy page with Cyrillic, what’s wrong?
- post tag texonomy rename getting error
- Creating a Custom Post Type
- Fixed values for same post translations
- How to give all CPT a folder automatically based on their slug
- How to make front end form only accept certain values
- WordPress custom taxonomy template not working
- Can a shortcode included in post content add styles to the ?
- Category.php template for custom posts
- help
- Category archive in with conjunction with custom post type is empty
- Custom post doesn’t show featured image
- Create field of Custom Post Types
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- ACF for custom post type archive pages: which hook to use?
- Pagination hitting 404 page on /page/4
- Custom Meta Box returns no HTML
- Post Type Support Array Not Working
- Save Metabox Custom Field Value
- Multiple Loops on a Page Without Duplicates
- get_post_types not working properly in admin
- How to hide a custom field from admin?
- Get the latest comment from a custom post type where depth = 1?
- Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?
- Custom Meta Box with variable number of fields
- Specifying a template for custom post type pages
- Custom Post Type, Pagination and 404s?
- Do post types share the same records using the same taxonomy?
- build Custom post type and make it child for Posts and put it as comment
- Creating archive like functionality through birectional relationships
- Display another page / custom post type as home page
- Action on Custom Post publish
- Post template not applying on theme (potentially rendering as Page template)
- How can I add image sizes for a specific custom post type?
- Problems in paginate_links with custom query loop and MB-Relationships
- Trigger WP CRON from a date in a Custom Field?
- $_POST from a Meta Box
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- posts_per_page is not working by term
- Filter Custom Post Type Posts by Taxonomy
- How to display only child category post in related posts in custom post type?
- How to store additional data that is related to core data
- % encoded URL giving 404 error in WordPress
- CPT: multiple loops with different terms
- Autofill advanced custom field with user data
- How to get a custom post type archive paged when using a custom field for post sorting?
- Multi Photo Upload with Caption on Front End for Custom Post Type
- Group based routing and administration
- Why does my plugin require a permalink reset after a new installation?
- Limit Number of Custom Post Type Dashboard
- Reference field of users in custom post type
- Avoid another meta box in my custom post type
- Not Able to Get Custom Post Type in Single and Single-custom-post-type
- Get posts of an specific term of a custom taxonomy
- Publish post and create additional posts with same content
- New WP_Query not isolating custom post types on front-page template
- Excert ( the_excerpt(); ) Not working properly
- Keep same archive.php for post from archive?
- Use one template for different custom post types with the same markup
- Events with multiple event dates + permalink for each date
- After rewriting post type’s URL, the number of queries has increased dramatically
- Pagination not working on homepage
- How to query custom post then display sections by meta value
- Prevent users from changing post status
- How do I paginate a custom post type listing on a custom template page?
- A to Z list for custom post types
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]