How To Exclude Page Permanently In WordPress Without Using Any Plugin

Excluding page in WordPress is fairly easily when we were given some particular function in WordPress to list out pages  such as wp_list_pages or get_pages where these methods all gives us certain parameter for us to exclude certain  pages that we do not wish to display. And these methods are usually used on WordPress theme although occasional we would put them into WordPress plugin for other reason. However, using these methods will only exclude page on the THAT particular function call which really doesn't suit my need. I want something permanent which excludes every page whenever i use those methods. If you are like me who do not wish to use plugin such as the Exclude Pages plugin by Simon for whatever reason you have (mine was because of efficiency and customization wise), this may be an article that will definitely help you.

Excluding Page Permanently In WordPress

Anything that you wished to permanently done on WordPress will usually associate closely with action or filter hook in WordPress. In this case where we want to exclude page permanently, we will use filter hook.