Add Below Code For post title, page title, category title , tag title , taxonmy title , Author title .
According to your Needed.
function page_title_sc( ) {
$title = ('Page Title');
if ( is_page() || is_singular() ) {
$title = single_post_title();
} else if ( is_category() ) {
$title = single_cat_title( '', false );
} else if ( is_tag() ) {
$title = single_tag_title( '', false );
} else if ( is_author() ) {
$title="<span class="vcard">" . get_the_author() . '</span>';
} else if ( is_post_type_archive() ) {
$title = post_type_archive_title( '', false );
} else if ( is_tax() ) {
$title = single_term_title( '', false );
}
return apply_filters( 'page_title_sc', $title );
}
add_shortcode( 'page_title', 'page_title_sc' );
Related Posts:
- Create a shortcode to display custom post types with a specific taxonomy
- Display custom post type with shortcode
- Add Content to Page without shortcodes
- How can I fix those issues generated by the Themecheck plugin
- Shortcode Displaying Custom Post Types
- Custom Select Query with Custom Post Types
- How can i list custom post type categories?
- IF statement in a do_shortcode
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Strip shortcode from specific post types (formats)
- Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it
- Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
- How would I create a shortcode to display a custom post within a page or regular post?
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Custom Post Type Loop within Shortcode
- Shortcode insertion in tab
- 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
- How to render a custom post type template with custom fields using shortcode
- 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
- Shortcode for CPT post content in a page
- Next Post links not working in custom post type shortcode
- Foreach inside shortcode not working as planned
- How to retrieve category of a post in have_post loop?
- the_post() is printing titles in page footer
- Add custom attributes to a post
- Shortcode leaves no space for other elements?
- Custom shortcode works in Elementor editor but not on frontend
- Custom post type Shortcodes wordpress
- how to create custom post type with dynamic category_name using shortcode
- Add shortcode inside of the_content()
- WordPress Custom Post Type and Shortcode for Portfolio Items
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- Creating shortcode id for custom post types
- Filter content in shortcode
- Shortcode with WP_Query more than once on one page
- Shortcode to return single custom post based on post taxonomy
- Change post type depending on shortcode
- Custom Post Type for Shortcode Use – Prevent it display as a post (with slug)
- How to call a post’s metadata in shortcode.php?
- Trying to write shortcode with get_post_meta but isn’t working
- How to display class name in this shortcode post query
- Problems making shortcode with custom post types and taxonomy
- Why is my custom post query shortcode only showing 1 post?
- display custom portfolio tags
- How do I output a list of a specific post type in a table?
- Shortcode in pages or tempate files for custom post type
- How to make post templates to include shortcodes only?
- php dynamic content inside shortcode
- How to show Custom Post Type – Case Study using Shortcode & ACF
- Show in an entry a Custom Post Type associated to a post
- Create a CPT to edit Shortcodes Atts
- Display CPT Category List as Shortcode
- Can Someone help me to create Short Code for displaying a category posts
- Custom post type shortcode
- background featured image display using shortcode
- WordPress shortcode to pull product post data
- Why can’t I filter my CPT shortcode by category?
- From CPT Custom Loop into Shortcode?
- editing shortcode for custom post type within a plugin
- Button link display in shortcodes using custom field in ACF
- Custom Post type shortcodes
- Custom post type shortcode with taxonomy attribute not working and no errors
- WordPress post not executing shortcode until updated
- Display Custom Post Type Archive content with Shortcode
- Load custom post type with ID in a shortcode
- Display a list of sub-pages of Custom Post Type Parent Page
- Extracting Post ID and passing through as an attribute in a shortcode
- Ads below footer
- Shortcode error
- Modify shortcode to work with custom taxonomies and slugs
- Custom Info Box at end of posts?
- Shortcodes in custom post fields without the_content()
- How to call Shortcode categories for custom post types?
- adding a shortcode into a custom post type
- Nested loop called with shortcode duplicating the content above the main loop
- Add number in increment of one to DIV ID
- shortcode for recent custom type post
- Create shortcode for list of custom post titles with custom fields alongside
- Creating shortcodes with user created forms
- Navigation links to posts in current term shortcode
- Adding custom shortcode to page leads to page without styling
- custom post types shortode stays on top of other page contents. Is there a bug?
- 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
- Shortcode in a page to display custom posts which also have a shortcode in them
- How to loop through a custom post type using a shortcode and output each element in the loop using shortcodes
- trying to display custom post type with custom taxonomy value by shortcode can’t works [closed]
- How to separate posts by categories?
- Problem with shortcode
- strange issue with get_post_type() when using it in a shortcode in text widget
- Custom Field in Page Title
- SOLVED: Shortcode to display Divi project filtered by tag in WP Query loop
- Add Shortcode functionality to a function that queries custom post type / taxonomy
- Generate list of posts on a page, but fill shortcode values from ACF fields on that page