May I suggest you provide details as to the exact problem, and what the results are of your example code?
Also, it seems like you are saying that the pages you want to get the titles of are siblings of the parent, which is the home page, so in fact, they are not children at all (An interesting plot for a TV drama, perhaps).
In any case, instead of using the title for your ID, I would suggest using the slug (post_name) instead:
$current_id = get_the_id();
$post = get_post($current_id);
$post->post_name;
Using the title might results in spaces in your ID, which could result in an array of IDs, not just one.
Related Posts:
- Do not show child pages of child pages
- Query to list all galleries under a parent post?
- Check if parent page has child page of certain slug
- Shortcode outputs at the top of the_content
- Combining shortcode and get_template_part
- Escaping quotes from shortcode attributes
- Shortcode output always showing at top of page
- How to detect if a Shortcode is being called on a page?
- How to get current page title inside a page itself in a shortcode and in page content
- Short code to display a loop
- shortcode inside another shortcode
- How can I just get content inside a shortcode or just outside
- Need MySQL Query or WP-CLI command to updates old URLs in Shortcodes [closed]
- Custom Shortcode AJAX 400 Bad Request
- WordPress core responsive video not working with shortcode
- shortcode to create dynamic dropdown box form shortcode attributes
- conditional shortcode not working
- Can’t seem to get [shortcode]s to work
- Wraping $content into link with shortcodes
- nested Shortcode doesn’t work
- Simple contact form with field validation
- TinyMCE get selected text and underlying HTML
- Rewriting WordPress Gallery Shortcode with Bootstrap Carousel
- other shortcodes in Contact form 7 MAILS [closed]
- Remove empty p-Tags in Shortcode content before non p-Tags
- What is a short code?
- Wrap shortcode inside custom block
- Instagram URL is converted into oEmbed
- Shortcode with no attribute but has value
- Remove wpautop from specific shortcodes only
- Creating a shortcode based on users preferences
- Get a post’s thumbnail url or display default image in shortcode
- basic shortcode – Why 1st paragraph not wrapped in p tag, but 2nd is
- unwanted P tags in shortcode, delay wpautop not working
- Shortcodes and a list of IDs?
- Shortcode adding plugin output before post, instead of inline [duplicate]
- Convert HTML Script to Shortcode [closed]
- How to build a shortcode which can insert a query string into a DB table
- Visual Composer integration [closed]
- Registration Form Shortcode
- Include tags in the body of a post
- no content after shortcode
- Remove shortcodes that are different (but same pattern) in each post
- Place a URL parameter value inside a WordPress short code
- Shortcodes in excerpts returning empty string
- Scripts for shortcode: concatenate or load separately? [closed]
- Print shortcode in defined area
- WordPress shortcodes are not working
- Conditionally Loading JavaScript/CSS for Shortcodes
- How to use/enable Pagination?
- Wrap Shortcodes and wpautop
- Shortcode called twice
- Favorite websites with shortened hyperlinks
- Best way to find all shortcodes that come with WordPress
- Using Variables in Shortcodes
- Default Attributes in Shortcode Not Working
- Replacement for gallery_shortcode function not taking all attributes
- Add JS in footer via shortcode?
- Shortcode syntax errors
- Passing variable in nested shortcodes
- Shortcode Always Displays Default Attribute Value
- WordPress Shortcode / Only works in classic editor, gutenberg error / invalid json response
- Do shortcode in template file
- How do I fit a function inside an opening and closing do_shortcode
- Pass instance number to shortcode child
- How to make shortcode which returns HTML?
- Add shortcode within the_content()
- How to create a custom shortcode for custom login form?
- Enclosing Shortcode not working in a Template
- hard code shortcode only on specific category
- pass complex json as shortcode parameter
- Image Caption Shortcode Broken upon update
- How to include shortcodes and pdfs in WordPress search without plugin?
- How to embeded shortcode for another website
- To know whether insert shortcode in custom meta box
- Gutenberg Shortcode will turn html to html entity
- Need help in setting up a transient using API Key and if possible updating it in the ACF field
- the_content() not showing the content in good order (with a shortcode)
- Execute shortcode in backend
- Shortcodes not working in custom page
- Get label in user meta query
- How to Enable embedding WordPress default gallery in comments?
- Print shortcode according to site language
- Remove a short code and update it’s content (AJAX)
- create a shortcode for embedding google map in a page
- Timber – don’t display shortcode
- Use ACF array values in shortcode
- php in a shortcode
- Pull in excerpt with shortcode
- Short code format for cat tagging when posting from email
- WordPress core playlist function not showing artist and album info
- Problem in creating a shortcode form custom post type slider
- Shortcode for Admin Theme Option?
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What makes a placeholder resizable in Tinymce?
- Create plugin/function to catch XML-data via Shortcode
- Why My slider shortcode display above header
- Shortcode conversion to hrml when post is published
- Shotcode error on functions
- Shortcode for displaying the user’s first name?