I would not try to get too tricky and hide pages from users. What happens if they try to create a page with the same slug? I think it would just create confusion and more problems than it would solve.
When you create the pages, store their IDs, not slug. Let users then change those through your options screen. This is similar to how WordPress tracks your blog and front page- by storing their IDs in options.
Then for the templates, add a filter to page_template
and apply your custom templates if the ID of the requested page matches what’s stored in the option.
Related Posts:
- WordPress security issue to output data from user input from theme option form
- How to create a backend for a custom theme?
- Override category archive page title (not the head title)
- How to hide/remvoe unnecessary field/section in post edit section ( Dashboard )
- Post Pagination does not working on WP-Query
- Managing Custom Designed Content
- Create and style menu
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- What process do you use for WordPress development? [closed]
- What is the advantage of using wp_mail?
- Should Plugin Folders Include a Blank index.php File?
- Overide get_template_part( ‘partials/post’, ‘sidebar’ ); with a plugin
- Should I create a theme or a plugin?
- Include third party Javascript library which is not included in WordPress
- Where do I start from
- WP 3.3 Tooltips API?
- wp_remote_get doesn’t work with secure connections https?
- Using a Theme inside a Plugin directory
- Authoritative answer on which boots first – Plugins or Themes?
- How to Add Font Awesome Icons to WordPress Menus?
- How to Use WordPress Color Picker API in Custom Post Type Metabox
- Custom theme sufficient or custom plugin neccessary for this feature set?
- How to create custom home page via plugin?
- How to debug WordPress correctly?
- Programmatically Selecting Theme Based on URL
- Featured Image not showing in admin
- Calling a function from functions.php in custom page/ blog post
- How do I approach removing menu items on the fly based on settings in my plugin?
- Set a specific page as 404 – not found via my own plugin
- Whats the difference between blog_info(‘stylesheet_url’) difference get_stylesheet_uri()
- Paging on a future post loop?
- How to check if a stylesheet is already loaded?
- Problem with is_active_sidebar?
- Change template dynamically
- WordPress add_admin_page not working even parameters are correct?
- Get Current Menu Location inside Nav_Walker
- Howto: Use Custom Post Types as Submenu Items in Admin
- Extending theme PHP class in plugin
- what is the difference between these phares?
- How to limit number of number of categories displayed by categories widget
- How to hide or rename “X” and “x-child” references in website source?
- How to Find the Page the Front Page is Using?
- Plugin is not generating title tags on any pages or posts
- Is it necessary to do validation again when retrieving data from database?
- Update Data parameter of a wp_localize_script() call
- get_the_tags with separator control?
- How to only load css for used blocks on frontend
- Add Password Generator on password protected page
- Add child pages to submenu automatically
- Why in this archive page that call query_posts() function show only the last 10 posts?
- WordPress pages are not published due to External database connection with WPDB class
- Create page (not the post type) dynamically
- PHP File_exist() not working – Checking if File Exist in WordPress Theme Directory
- Why would you use esc_attr() on internal functions?
- Invalid hook call on save, not edit when using swiper slider
- How to find where an object first instantiatiation
- Full documentation about $args for register_rest_route?
- How to get terms for taxonomy
- How to remove/replace current page template?
- How do you create a re-useable HTML fragment in wordpress
- WordPress Page Reload Takes forever during theme development
- Adjust query on single
- Using password protection to load different page elements?
- Anyone using unzip_file successfully? It uploads the zip but doesn’t extract it!
- Displaying custom content from a plugin within the active theme
- Load specific page when a custom URL is hit
- When I click for the redirect link it is showing the content of index.php instead of single_assignment_page.php
- How do I add filter with woocommerce categories?
- Need Help to make a logic for editing posts in Frontend
- How can we stop showing short code in create or edit post section
- when i activate my WordPress plugin cannot see customizer options or preview
- Custom non-template page on front end fails to render
- Error Connecting to Database WHEN Installing WordPress on XAMPP [Tried All the Usual Stuff] (Pics Included)
- How can I measure CPU and RAM used by my theme or plugin
- Redirect theme directory to plugin theme directory
- set a custom post type to a taxonomy term programmatically in metabox
- My enqueue admin style function doesn’t work because of ?=ver
- Can i prevent the effect of the_title filter on the dashboard’s posts/pages titles?
- How to embed or integrated a custom WordPress Widget into the theme?
- wp_editor some functionality not working on custom theme
- One-Page WordPress Template
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- How to create multiple pages in a client theme?
- How do I control the list of Pages an author can see?
- To remove rendering of menus and header, plugin or theme?
- How to add conent (text) to Add New pages form of admin in WordPress
- How can I add recent posts to menu like mashable
- auto create only 1 wp page in activate custom plugin
- Is there a general way to get a themes primary colour?
- How to Register/Link to .js Files in WordPress Dynamicaly in Header.php
- How get the 10 most viewed pages (not post)
- Developing Themes on WordPress, Looking for Excellent Tutorials [closed]
- Best Way to Inventory the Media Library of a 200+ Multisite Installation?
- Loading jQuery library from WordPress admin
- Using tag or inline style attribute?
- how to insert content into wp_head after loop_end
- Find Any Theme’s page.php File
- How to create A – Z List with pictures?
- How to make content as required in custom post type?
- Generating Multiple Divi Pages from Database