I have inside a theme two important static pages. One is a confirmation page (after signing up for a newsletter) and the other one is a thank-you page.
I am using these in various functions and create them upon theme install with predefined content.
The problem is some users tend to change the slug, or the title of the page.
I am currently using get_page_by_title but that doesn't work once the title is changed. I have a fall back that the user can define inside an options panel which one is his confirmation page but I really don't like this solution. The other problem is that once the title is changed my page template (for example page-confirm.php) doesn't get apply automatically neither, so the user has to choose it as well.
Is it possible to create fixed static pages that don't show up inside "Wordpress Pages"? Like a static page for internal use only?
pre_get_posts
filter with condition Is it admin Pages list? Than exclude posts with ID 4, 5 and 25. So those pages will never show in Page list ... but I don't know if it is bulletproof solution. – Marek Aug 21 '15 at 9:18