There doesn’t appear to be one, but the following should work:
//Get post type
$post_type_obj = get_post_type_object( get_post_type() );
//Get post type's label
$title = apply_filters('post_type_archive_title', $post_type_obj->labels->name );
$archive_title = apply_filters('post_type_archive_title', $post_type_obj->labels->all_items);
This can, for instance, be put in one generic header
template that is applied to all single-cpt
files. With is_single()
it can be put in an even more generic header
template.
For a complete list of labels, see http://codex.wordpress.org/Function_Reference/register_post_type#Arguments
Related Posts:
- is_singular won’t call my functions?
- Disable single pages and archives and keep preview
- How to show the archive / post type description on Single templates
- Can’t access private custom posttype single- or archives-page
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- is_singular won’t call my functions?
- Custom post type single-{custom}.php not working
- Adding content to archive and taxonomy pages on custom post types?
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Displaying category archive of custom post types
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Template for specific post of custom post type
- $query->set in pre_get_posts is unintentionally affecting the backend
- Setting up custom post type archives in WP3.1? Any luck?
- Filter for “get_post_type_archive_link()”
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- How to show more posts on an archive page?
- Pre get posts for single post
- Create permalink structure for one taxonomy archive per custom post type
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- is_singular() not working if called via callback function of admin-ajax.php
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Display all custom post types in archives.php
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Custom post type tag archives don’t work for basic loop?
- Removing CPT slug from URL results in 404 error for archive page
- Multiple post types in archives (filter?)
- How to let custom post type posts show in standard post archive (like in homepage)?
- Include Custom Posts Type in Year/Month/Date Archive
- where can I see my custom post type archive template?
- Custom post type archive sorted and grouped by date in post meta field
- Custom post type with tags
- Displaying Meta Box Image
- List custom post type but redirects to home page
- Custom-post-type-archive: posts sorted/filtered by year?
- Disable single view in register_post_type [duplicate]
- Custom post type archive page pagination
- Redirect Single Post CPT (Custom Post Type) to a specific URL
- How to get “custom post type”-archive with working permalink to it?
- How to call custom single post?
- Custom post types archive redirect
- just can’t get date-based archives per post-type to work
- Custom template page with custom archives listing by user
- Remove single page for custom post type
- Single Template that can be applied only via URL
- Root slug of taxonomy returning 404
- Change CPT archive title
- How to get post type and month/year before while loop for date.php file
- Custom archive page for CPT UI
- How to display custom post in archive section of the wordpress page?
- The loop seems stuck to a single (now deleted) post
- Use “archive” as slug for custom post type
- Custom post type posts don’t show in archive widget
- Archive for a Taxonomy of a Custom Post type
- Cant get paginations on single.php to work with my custom post types
- Including all post id’s of a custom post type into an array
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- List of users that clicked a ‘Join’ button at single post
- Taxonomy archive 404ing (not term archive)
- Return the name of the post type
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- Inserting custom fields into single.php
- archive as a page, so that it can be added in the wp_menu_nav
- Archive links for custom post types
- Show All Custom Post Types On A Single Archive Page
- How to show custom field on specific custom post type posts only when filled
- adding custom post type “name” to single template
- Dynamic category name in query post
- Custom Post Type Archive Pagination
- How to know which archive page is active
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- Archive Template being used instead of Category Template for Custom Post Type
- Menu’s breaking, now showing all page links on site
- How to have multiple archive pages?
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- How can I increase the post count for custom post types only?
- Listing authors and date archive from custom post type
- WordPress sitemap with Custom Post Types
- Is possible register two archive pages for single custom post type?
- Custom Post Type Archive Page showing as 404
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- Custom Post Type archive page listing a 404 or single post
- Adding Custom Post Types to category/tag/author archives breaks header content
- One of my headings is mysteriously coming up as a link in my CPT Archive
- How to show data content from single page which is from custom post type?
- I broke it! Custom post type archive gets redirected to home
- Single Page of Custom Post Type Not Showing the Content Of post
- Want to display my custom date archive to date.php but dont know how
- Custom nav menu current item custom link problem
- How to Fix Custom WordPress Loop with Pagination on Single Post View?
- Stop Custom post type from being searched via URL
- archive-{custom_post_type}.php not getting recognized wordpress
- Two single.php files?
- ‘Blog Archive’ suddenly appeared on custom post type; how to remove
- Display results from two Custom Post Types in page template
- Stop header code from showing in category page?
- Pagination not working for archive
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- WordPress Multisite Network Shared Custom Post from Main Site using single-CPT.php
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query