Can I create a page template, use it once, then hide/remove the option to use it again?

If a page won’t work without a specific template, I would just remove the need for them to select a template. Filter template_include and select the template based on the requested page: function wpse50455_template_include( $template ) { // check if it’s a page if ( is_page() ): $this_page_id = get_query_var( ‘page_id’ ); // check for … Read more

Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]

There’s no way in WordPress to assign the capability for editing (or any action) a specific post to a role. However, you can filter capabilities checks and change them on the fly using the map_meta_cap. When handling post permissions, WordPress ultimately deals in just 4 capabilties: edit_post read_post delete_post publish_post Then whenever an action is … Read more

How to load JS and CSS only on specific Pages using is_page()?

If $page_selected returns a string containing the page title, it should work fine. I have tested it and is_page() accepts page title, page ID and the slug. If you are facing issues, it will be better to store page ID in the database and use it with is_page() Please refer to https://codex.wordpress.org/Function_Reference/is_page for more details … Read more