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
- What is the proper method of using global $post?
- How developed with version control word press site on shared host? [closed]
- How to export post meta with images in wordpress
- Password field is empty when using wp_signon();
- How to change title tag at page after loaded post?
- Following WordPress Markup Is mandatory, got awkward resultyby wordpress standard markup?
- How do I create plugin or theme using MVC pattern?
- How to limit number of number of categories displayed by categories widget
- PowerPress mobile media player
- When is the proper time to minify css and js with git workflow?
- Strange Situation When Try To Retrieve Github Gist Using wp_remote_get
- How to hide or rename “X” and “x-child” references in website source?
- WordPress custom taxonomy check box to dropdown
- How to Get Current Custom Post Type Associated Taxonomy Term
- Plugin generated virtual pages
- Plugin templates vs Parent Theme
- Selectively update themes in WordPress multisite
- Auto-Populate Image After Media Upload
- Widget HTML Display Problem
- How to Find the Page the Front Page is Using?
- How to place HTML tags in content from the_content()?
- wp_nonce_field displaying twice
- How to make “upgrade safe” theme for a plugin?
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- Plugin is not generating title tags on any pages or posts
- Is it necessary to do validation again when retrieving data from database?
- How do I combine a theme with a plugin
- How to Control CSS of Admin On Creating only a Specific Custom Post Type
- Can’t change the style of a submit input type? [closed]
- Make a plugin page out of influence of the theme’s style
- Update Data parameter of a wp_localize_script() call
- Custom entity search and display
- WP Plugin Running before jQuery
- Template directory in plugin
- get_the_tags with separator control?
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- How to only load css for used blocks on frontend
- 400 Bad Request, in wordpress theme development, wp_ajax
- Template for landing pages
- Add Password Generator on password protected page
- Add child pages to submenu automatically
- How to write “alt” tag in image for wordpress code?
- ECHO Executing 4 Times In Head
- 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
- my own SVN for a plugin/theme
- Issue on Setting $icon_url Parameter on WP add_menu_page()
- Are there any official or unofficial guidelines for the styling of a widget?
- Why enqueue styles on hook?
- Getting a WordPress Debug Strategy
- unable to wp_enqueue_script(‘suggest’);
- Drawing the line between theme & plugin on large scale bespoke projects
- Apply styles to blockquote element with the WYSIWYG editor
- 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
- Proper way to use useSelect
- Conditional Generation of Image Sizes using add_image_size
- How to add the sidebar to all the pages except the home page? [closed]
- How to add plugin options in wp editor page
- Multiple array for post_content on plugin activation
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- How to find where an object first instantiatiation
- Gutenberg blocks error: Each child in a list should have a unique “key” prop
- Full documentation about $args for register_rest_route?
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- modify show UI of a registered taxonomy
- Using function from enqueued .js file in theme in plugin?
- Does WordPress default CSS have Grids?
- Using HTML links within translatable string
- How to resize WordPress images on upload to specific height and width without cropping it
- How to track a users last visited page?
- Get images / media attached to a page by page ID
- How to list all images used on a specific page?
- How to get terms for taxonomy
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- How to replace settings in WordPress plugin from a theme
- Save temporary registration data
- Toolbar Hidden in a Virtual Page
- How To Protect Plugin Display From Being Affected By Theme’s CSS
- How to remove/replace current page template?
- WordPress dynamic widget by location?
- How do you create a re-useable HTML fragment in wordpress
- WordPress Page Reload Takes forever during theme development
- Adjust query on single
- Setting a post’s category
- rewrite_rules problem
- Using password protection to load different page elements?
- Set page to draft on plugin deactivation
- Anyone using unzip_file successfully? It uploads the zip but doesn’t extract it!
- How can the_excerpt (or equivalent) be called on a category description?