Make use of the exclude parameter, see Codex: wp_list_pages – parameters.
So for example you do:
$self = $wp_query->post->ID;
and add:
&exclude=$self
to your wp_list_pages arguments.
Related Posts:
- How to get post category list as select in front-end?
- Build a content and excerpt grid loop with paging and options for # of posts
- How to get the registered sidebar’s name by its id?
- Why does “get_option” pull in the older value in options.php, rather than the newer value, on submission of a form?
- display most popular tags in two columns
- How to add 2 posts under another post? Formatting should be intact
- WordPress menu deletes when trying to add a hook
- Get widget settings function?
- javaScript in section of WP API
- Add before_content and after_content to register_sidebar
- PHP Deprecated: WP_RSSjb has a deprecated constructor
- Use wp_get_recent_posts with search term
- Remove query string specific key value
- How to put a variable in a instance in the widget
- How to prevent WP_Query function from returning all posts when empty?
- Display a specific category of products in shop page and disable code for specific actions
- Get users that likes the post
- Adding a widget function into the php theme file
- Remove echo from shortcode
- Security for data obtained from the database
- Widget back end radio button issue
- WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank
- My website is not showing Footer section
- change the default order of posts only for specific categories
- Post not populating for custom post type based on category selection
- Custom query vars filters problem with pagination
- Show different website layout if no sidebar added
- Displaying Event within two given time frames
- Add a select-option to the default widgets
- Let current user know pending posts counts using wp_query
- Output product category link from WP_Query
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- “pre_get_posts” orderby custom date field in different format?
- How a HTML form can trigger a PHP function?
- How to exclude meta no index pages from wp_list_pages
- WP query posts BUT show the most recent and one per author
- Ajax filter with loadmore button
- posts_per_page displays only 2 posts instead of 4 posts
- Delete post meta by serialized meta value
- Modify post image in full size
- WP_Query To Display Product Of Brand On Taxonomy Page
- is_user_logged_in() not working in homepage
- Custom Post type Ajax search results
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- Add disclaimer before certain posts and pages
- My query keeps looping infinitely ! how to stop it?
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- How can I display a query in a page?
- Display Year and Month from custom field + Age Calculator
- insert thumbnail image from php script
- Weird Behaviour: Not all WordPress Posts appearing
- WordPress – registering sidebar and adding a button directly after .textwidget
- How to get category pages to look like a certain archive page?
- WP Debug enabled Undefined index error in a widget
- How to modify this function to exclude also the post belonging to a specific category?
- a problem in class in class-wp-hook.php
- /page/2/ redirect to 404
- Add adjacent post function inside custom recent post function
- wp_logout action hook is not firing
- Developing a “fallback” for empty wp_query results based on post dates
- Filtering with Attributes – how to display all non-queried products below query
- List of all theme customizer control types?
- Modify previous and next text from pagination links
- Inject post (from specific category) between posts in Loop
- Shortcode putting html such as
- Calling a method from functions.php on a click of a button
- Passing JSON data from WP Query into AJAX causing NULL errors
- How to redirect users to custom lostpassword page?
- WordPress widget in custom theme
- How to change featured content to a different tag in WordPress Twenty Fourteen?
- Can I write ‘RewriteCond’ using ‘functions.php’?
- How do I create comment-reply-button using element not
- Anything I can add to functions.php to make text widgets accept PHP?
- Overriding a theme redux file in child theme
- Validate a users email address when using gmail to register
- How can I add a specific, custom widget to my theme’s header.php?
- Count number of published posts by type
- How to display custom field on homepage
- Can’t increase posts_per_page by variable
- How to check If Oembed is empty or not
- Making Quote Plugin more efficient
- Adding tawk.to code just before body tag on functions.php file
- How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?
- allow subscribers to see private posts without plug in
- get current custom post ID by WP_Query method
- How to securely provide a $_POST var in WP_Query with PHP 7?
- Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?
- If Query In Sidebar
- Show css depending on activity type in BuddyPress activity-loop [closed]
- remove wp floating submenu in wp dashboard
- ACF: how do I get the fields and its values of a specific group?
- Fatal error: Uncaught Error: Call to undefined function test()
- Get page that displays all children of taxonomy parent
- Return a numerical function value in Customizer controls
- How can I get the values of my WordPress $wpdb query in Jquery?
- Css loads very slow [closed]
- Show when user is online/offline in real time on user_profile.php
- My new button is in the wrong place
- theme_root returning a truncated URI
- Call to undefined method – Download Monitor