I know it is a bit old question. But I hope some one can find it usefull.
If for some reason you can’t use child-theme (like me) there is hook theme_page_templates
Accordint to developer WP Page Templates.
Example:
function makewp_exclude_page_templates( $post_templates ) {
if ( is_multisite() && !is_main_site() ) {
unset( $post_templates['wp-templates/iframe_container.php'] );
//In my case this one is removed from the list on every page other than main site
}
return $post_templates;
}
add_filter( 'theme_page_templates', 'makewp_exclude_page_templates' );
Related Posts:
- How to share WordPress core library
- Programmatically create blogs with dummy content on a WPMU site
- How to individually set WP_DEBUG on a sub-directory multisite?
- Create multiple subdomains for multi-site from a database
- 4 single sites VS multisite wordpress
- multisite htaccess 301 redirects
- Two-level multisites in WordPress
- using 1 form shortcode (si or cf7) for all multisite sites [closed]
- How to manage multiple domain with different languages on each domain with single wordpress installation?
- Display custom homepage text based on domain
- Add new domain to ‘My Sites’ using network admin
- Is there an advantage of using multisite if I have multiple WordPress websites for myself?
- Redirect loop (only for multisite network admin)
- Jetpack Blog Subscriptions on Multisite [closed]
- current_user_can(‘Administrator’) does not return true in multisite if user is Administrator but NOT Super Admin
- cant enable theme in multisite
- Deleting a user in multisite
- Recover from failed multisite conversion
- Proper Network Activation problem has been fixed in wp 3.3.1 or not?
- On WordPress Network(multisite), Sub Blogs in Subdirectories or Subdomains? What’s better?
- How to know if a site is using Multisite?
- Cookie nonce is invalid – Multisite
- Multisite setup on VVV with bedrock
- How can I delete a user from entire multisite nework
- Using A Shared/Common Theme Across Multiple Sites
- Multisite Network menu links not updating
- Activate Child Theme with Codex
- Multisite Network Localisation
- Can set_transient() be used in multi-site?
- WPML tables not deleted when removing multisite subsite, need help clearing up my sql-file! [closed]
- Why does my multisite blog doesn’t show users?
- What would you recommend for hosting 10+ individual wordpress websites?
- ERR_TOO_MANY_REDIRECTS IN MULTISITE NETWORK DASHBOARD
- Redirect only posts to New Domain
- Image problem – Multisite image upload broken
- WordPress Multisite new sites in directory
- add_rewrite_rule on multisite doesn’t work
- web.config breaks the themes for sub-directory multisite
- How to configure Multisite Network with randomized hostnames?
- Different use for WordPress Multisite
- wp_insert_site() is triggering database error in a unit test
- Multisite: How to get a list of installed languages
- “You must be logged in to comment” but I am already logged in
- Multisite User Sync Question about blog authorship
- WordPress multisite .htaccess causes 500 error on old *.php URLs
- WP-CLI cron on multisite using WP-Toolkit “succeded”, but callback not executed
- WordPress multisite suddenly malfunctioning
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- Cannot use pre_set_site_transient_update_themes from within a theme in multisite
- Login problems on multisite installation with different domains
- Multisite, with virtual root
- Domain Mapping for WordPress MU and https redirection – How to?
- Move wp-content htacess
- FeedWordPress duplicated posts problem
- WordPress MU subdomain vhost
- Domain mapping with Multisite links are wrong
- Install multisite wordpress on a subdomain and map to top level domains
- Get latest blog post from another multisite blog
- Include www prefix in site URL
- Is this possible? A multisite with “www.example.com/en/blog/” and “www.example.com/cn/blog/” (two directories deep)
- How to modify wp_config file for set up subdirectory?
- Sharing users across multiple sites, each on their own database
- Activation Account Email
- Is this a good case for Multisite?
- WP Multisite – How to create a custom “router” for blog prefixes?
- How to automatically translate plugin using translate.wordpress.org
- May I do multiple micro-sites with different themes in a single wordpress without subdirectory nor subdomain separation?
- Multisite htaccess file causing segfault (Segmentation fault 11)
- How do I export a single site in a multisite content without using a plugin? The default WP export does not catch all
- Multisite Smtp Server
- Images uploaded after adding multisite do not get loaded in any domain of the multisite network
- Migrating from domain mapping plugin to native domain mapping
- Media library links broken WordPress Multisite after SSL update
- When hooking wp-cron to system
- WordPress network, add extra directory to subsite urls
- How to disable Gutenberg editor from Multisite Admin panel?
- Multisite wp-admin redirecting to main wp-admin using NGINX
- Register a user only to the root blog – WP Multisite
- Update Same Contents on every Page
- Send data from one WP instance to another and process it there
- WooCommerce API Returns 401
- Define default settings for new sites on multisite network with mu-plugin
- User not staying logged into one of sub sites in multisite after SSL
- WordPress Multisite Network Subdomain
- Multisite + wp_mail – Route Via Site Conditionally
- Allow users to register on multisite through WooCommerce using the same email address
- Use a single WP installation instead of three
- MU domain mapping without using a plugin
- Can WordPress Multisite work like a regular site?
- Multisite authorization error 401
- How create a multisite setup with “phantom” accounts and passwords?
- is there a if multisite have posts function?
- Multisite – mix sites that use subdomains with sites that use paths
- WordPress Multisite — Have same navigation, sidebar and footer across all sites.
- Primary site file uploads failing, subdirectory subsites upload fine
- Subdomain Wp-Admin Not Found
- Run “get_the_post_thumbnail” with a different table prefix?
- Pick your brain on wp-config.php if statement for multisite
- WordPress Multisite restict user access
- Redirect to Multisite site 2 if site 1 has a setting