You can create a shortcode to fetch the title of current page. Try copying the following snippet in your child theme’s functions.php
function post_title_shortcode(){
return get_the_title();
}
add_shortcode('post_title','post_title_shortcode');
Use [post_title]
shortcode to display the title of the post or page.
Related Posts:
- How to change page title (from a plugin) in twentytwentyone theme
- Changing the title tag from a shortcode
- Add the last viewed post title to a contactform with shortcode [closed]
- How can I insert a shortcode in the title tag of another?
- Shortcode to appear and show the date not code in Title and description of Social Media sites
- Date Shortcode in Image alt and title tags
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- Shortcode outputs at the top of the_content
- Combining shortcode and get_template_part
- Escaping quotes from shortcode attributes
- Get all posts containing a shortcode
- Custom Shortcode and Button not Working after 3.9 update
- Hide Default Video Shortcode Controls on PageLoad
- shortcode not working [closed]
- Change font-size within a shortcode
- How can I show the Jetpack Subscriptions form in a page? [closed]
- Splitting Shortcode Attributes not working
- getting values from a shortcode with an include
- Create a shortcode in WordPress, again
- gutenberg widget outputting paragraph marks
- change wordpress gallery shortcode to slider
- Change link in get_terms if there is only one post in the category
- How to get total number of shortcodes in the wordpress application?
- Bulk converting shortcodes to blocks with embeds
- How to add source code into wordpress post really?
- shortcode_atts – one URL variable not working
- Caption shortcodes not including caption as attribute
- Make shortcode’s Bootstrap CSS override the theme’s CSS, how?
- Passing a nested shortcode as an argument of another shortcode?
- How does one insert a variable value into a “myCRED plugin shortcode [closed]
- Change the default video shortcode
- How to use shortcode in js url
- Nested Code Snippets [closed]
- How do I display “Hello username” if logged-in on the homepage
- Adding a Cookie Session to Shortcode Content
- Shortcode to show current post category with link
- Gutenberg Block with Select from JSON-File
- Shortcode function executed twice?
- How to register a user via modal after clicking a link in the shortcode?
- add widget to page content (using shortcode)
- Pagination for a page created by the shortcode “Product”
- Freeze a shortcode in place?
- Unable to the get the gallery inserted between shortcodes
- Complex Slider Shortcode Help
- Using _e() on text inside video tags prints that text, instead of only showing when html5 element is not supported
- How to use the same shortcode with different attribute values on same page
- Youtube shortcode
- Shortcode will not pass attribute through to my function [duplicate]
- Displaying audio player as preview in audio post in WP3.6
- How to transform WordPress user role code to WP shortcode?
- Shortcode don’t work in custom option field, any solution?
- Does short-code slow down my WordPress site?
- redirect if shortcode exists
- Position shortcode off [duplicate]
- ob_get_clean(); doesn’t return $value in shortcode?
- How to Get Shortcode in Excerpt to follow Document Flow
- Cant fix this Warning: Invalid argument supplied for foreach() in [closed]
- Different ID in every shortcode
- Content between shortcodes
- Parsing a shortcode through an author meta textfield
- Adding YouTube button to TinyMCE editor
- How to find out what handler is registered to a shortcode
- tiny_mce_before_init preventing custom shortcode icon appearing
- Custom Fields – Boolean Display of True/False to Yes/No
- How to display NextGEN gallery in templates?
- Twitter bootstrap tabs
- jQuery Tabs in Shortcode API
- Build Clickable Link Using Multiple Attributes
- Echo Extra Shortcode HTML to wp_foot
- How can I use a plugin shortcode inside of a html form?
- Disable wpautop on Shortcode attributes
- remove shortcode pagination for specific url referrer
- Third-Party API – PHP Fatal Errors Paired with http_request_failed / cURL error 28
- Shortcode PHP file for two conditions passed when do shortcode
- Using within a shortcode
- How do I point bloginfo(‘stylesheet_directory’) to my parent theme?
- Add audio file to post using custom term meta field as link [closed]
- Display tags cloud from a specific category ID with a shortcode
- How to list child pages with excerpts, e.g. [child-pages depth=”1″ excerpt=”1″]
- Add a shortcode in woo-function.php
- Woocommerce products shortcode specific order
- Modify Blog Module layout in Child theme
- Video shortcode outside WordPress not working with IE and mediaelement’s Flash fallback
- Inserting a variable into a shortcode inside php
- Display title of child pages in shortcode
- Output html source tags inside shortcode
- How can I define the output of shortcode attribute value?
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What is the best way to include a template file within a shortcode?
- Shortcode templates
- Create plugin/function to catch XML-data via Shortcode
- Why My slider shortcode display above header
- Does anyone recognize shortcode ig_special_heading?
- Shortcode conversion to hrml when post is published
- Shotcode error on functions
- Shortcode for displaying the user’s first name?
- Can I prevent wordpress adding and tags to autoembeds
- Shortcode – Display inline icon before text [closed]
- 3 shortcodes 2 won’t render [closed]