Looks like a syntax error to me. Try:
wp_list_pages("title_li=&child_of=2143&exclude=$current_post_id")
OR
wp_list_pages("title_li=&child_of=2143&exclude=".$current_post_id)
Also I will suggest to pass parameters as array instead of a string, for better debugging.
wp_list_pages( array(
'child_of' => 2143,
'exclude' => array( $current_post_id ),
);
Make sure $current_post_id
is giving proper value.
Related Posts:
- Create a list of pages excluding children of selected page
- how to properly list child pages in sidebar?
- Get custom field value from Grandparent Page for Parent and Child Pages
- Given the page id, check if it has children
- How to get a list of all recently published child pages?
- WordPress get the child pages of current page
- Show siblings (if any) and parents
- List child pages of current page but limit to specific year
- Child page excerpt
- Create WordPress child page from page actions
- How to show child page without providing ID so it’s dynamic
- is_child() function
- Drop-Down Menu of Current Child Pages
- Get WordPress Child Page IDs
- Displaying the first child page of the parent page
- Adding title and description to subpage’s featured image
- Show list of Child Post in Parent Post
- List subpages in order
- parent page grabbing wrong url for child pages – get_page_uri($pageChild)
- i want to get the parent id, only on parent -> child -> child page
- Exclude child pages args array
- Get first level children of a page ID
- How to get an array of pages ID by some page’s slug and all its children pages in get_posts() function?
- Only one parent page showing
- WordPress Betheme: Unkown subheader image of a child page
- How to disable alphabetical sorting page
- Structure for calling child pages
- Child pages and sub-pages do not appear. Why?
- Add link to parent page in list of child pages
- Display child pages full template including the content
- Listing Child Pages in Random order
- How to display child pages with in a limited child content?
- Display Tags of Child Pages
- Get post_meta of children and compare to current page ID
- Display the latest content from subpages of another page
- Limit the number of child page displaying
- Show the grandmother/father of the childpage
- How to Hard Set the Parent Page in Template
- Get parent page url to show up when it is in child pages
- Can I have two child pages of different parents with the same name?
- How To Limit Hierarchical Pages Depth (For Custom Post Types) To Children Only
- Advanced Custom Fields – Get custom fields from parent page
- Exclude the category from the WordPress loop
- Skipping first 3 posts in wp query
- Child Pages Loop
- how can I use WP_Query to exclude a specific tag.?
- wp_list_categories exclude not working
- Delete Child Posts
- Exclude Custom Post Type & Pages From Auto-Tag Function
- Alter secondary loop to exclude posts from current page category
- Exclude file from theme editor
- Dynamically excluding current page id
- Share parent path between Custom Post Types and Pages?
- Exclude category from Tag Template
- Query: offset post list, unless it’s a specific category
- exclude post from displaying in loop if it is in a category, but not in many categories
- How do I list the child of a child page [duplicate]
- Custom rewrite rule for hierarchical custom post type
- List children on child post
- Exclude Posts From Specific Category from Next and Previous post links
- Append a code when at the current page in wp_list_pages()
- wp_insert_post if page doesn’t exist under current page
- How to retrieve parent menu item name of current submenu item
- Combining ‘depth’ with ‘include’ in wp_list_pages()
- Next Posts Prev Posts for Standard post format only
- ‘exclude’ argument is not working with get_posts for a custom post type
- Exclude custom taxonomy term posts from custom post loop
- Exclude posts with taxonomy term from appearing on home page query
- How to highlight 1st level menu item based on actual page
- 2 wordpress loops showing 1 post from same post type – how to avoid showing the same post?
- Get Child Page IDs by Parent ID
- List of child custom post types lists all custom post types
- How to exclude Sticky from Recent Post?
- Redirect to first child on Custom Post Type (without template)
- How to display childrens custom fields?
- Exclude posts by post meta value
- Display child page content of a specific parent on home page
- When listing child pages run out of memory
- How can I exclude a specific ID from this line of code?
- wp_list_categories not excluing multiple ids
- Exclude category from foreach loop
- Is there a way to dump all registered sidebar/widget?
- Exclude some categories from the post page
- Homepage custom recent news
- Better way to exclude category output for post/pages?
- Search results to be only posts & children of page ID
- Migrate Custom Post Type with Custom Fields data and parent child order
- Return true if parent page id matches
- Only Show Excerpt After First 3 Posts
- Child and Parent Pages list of sub pages
- Child Theme problems
- How to show the view more on my display of pages shortcode
- Why is wp_list_pages altering $post->ID of the page?
- Custom post type child page 404
- How to display elements of different post types?
- WordPress Template works until page becomes a child
- How to get child pages and add unique class only to active page?
- exclude page element from specific pages
- How can I structure my pseudo footer nav code with wordpress codex code?
- How to exclude first 2 posts from a specific category for a custom post type archive page