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
- Website parent child relationship
- Exclude post ID from wp_query
- 404 on child page when parent page slug is identical to custom post type
- Prev/Next child navigation for current page?
- How can I programmatically create “child” pages on theme activation?
- List child pages of a specific page
- Using pagination with get_posts on page type
- is there a quick way to hide category from everywhere?
- Add class to the items in wp_list_pages
- Exclude posts with specific meta_value while sorting by a separate meta_value
- Displaying child page content of a certain parent
- Get only the grandchildren, not the direct children of page/current page?
- Do not allow to search certain words
- Remove custom post type slug not working for child pages
- Page as a child of a Custom Post Type
- How to set post expiration date and time and move the page to archive after expiration [closed]
- get_posts() excluding all children of a specific post/page
- is there a way to retrieve posts that do not have a featured image assigned?
- Set order of returned items in the WP_Query() class/function
- Pagination of a WP_Query Loop in a child-page page template
- Schedule Page to Menu [duplicate]
- How do I exclude the current post from listing in recent posts
- exclude categories from search results
- Display the contents of a custom field of a page on their child
- How to hide all child pages with post_query?
- How to display all subpages and short by year
- Display Child Pages of Custom Post Type Parent Page
- Avoid repeated post on page 2 when excluding one on page 1
- How to populate a parent page with its child subpages and associated templates
- Listing Child Pages in a Certain Order?
- Exclude post format from get_posts
- Multiple arrays in post__not_in parameter
- Redirect page to default subpage
- How to paginate a list of child pages
- Using WP_Query and Query_post for the loop?
- wp-query, pull children of parent page
- Exclude all subcategories in the_category (post)
- Exclude categories by ID
- remove term from custom taxonomy list
- WooCommerce Hiding A Certain Category From Being Displayed On Single Product
- problems exluding categories
- How to control display of page lists on sidebar that doesn’t have childrens
- Conditionally exclude post from specific category on home page sidebar?
- Disable the link on certain pages
- Custom child page permalink
- Skip latest 3 posts from loop
- Paginate nested query of child posts
- Adding custom slugs: parent-page/username/child-page/
- Children Pages Displaying Only Intermittenty
- How to exclude sidebar from pages?
- widget exclude post by custom field
- Category menu that filters out empty categories
- Custom Post Type Child Pages
- How can I give WordPress child custom post type the same title and slug as its parent?
- displaying child pages in columns when on a parent page
- 404 on child page template
- Problems with explode [closed]
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- Get Child Custom Post Content on Single.php?
- show 10 most recent custom post types excluding the one(s) from specific custom taxonomy
- Call function on a single page
- WP Recommended Table Exclusions?