Does anyone have any suggestions on how to disable certain template parts in a child theme using theme.json in WordPress with Gutenberg?
Using only theme.json
this is not possible, and runs counter to the vision for full site editing.
In the future it’s possible that not only the parent theme templates might be visible, but the templates of previous themes that the user has modified and saved. This has been talked about a lot by the designers working on the site editor, though we haven’t seen it implemented yet. This does mean that at the time of writing it’s extremely unlikely that it can be done entirely using theme.json
, and that they might even consider it a bug to be fixed if a way was discovered.
That’s not to say this can’t be done with PHP filters though, but it can’t be done with just theme.json
.
Related Posts:
- How can I make custom page templates work on child theme?
- Is it possible to override the result of get_template_part()?
- Loading partial templates with AJAX/PJAX
- Child Theme: how to override variables?
- roots child theme can’t override header.php
- Templates & CSS – Proper Programming Practice?
- index.php template is used instead of blog page
- Load template inside a parent template
- Child theme TEMPLATEPATH issue
- Load template file without a post type
- How to apply a custom template for posts by default?
- Unable to include a template
- Updating modified templates
- Child theme template file will not load
- Checking for page templates in child theme
- Should template files be copied to the child theme for editing?
- What should I put on my index.php?
- When a link doesn’t exist, how to tell WordPress what to do? (404 Error Page)
- Why does the Full-width Template in Twenty Twelve pack so many classes into the body class attribute?
- Override template file i subfolders
- Is there a way to set different post templates for parent posts and child posts in the same post type?
- How to preserve changes in templates and other files
- Having trouble with Template hierarchy. I Need to create a set of pages that drill down from states to specific locations
- Custom templates vs page-slug
- Understanding the Template hierarchy
- How does WordPress choose archive type template?
- Override Dokan Includes File in Child Theme
- Use one template only for custom post type archives?
- lost css when overriding themes templates
- ACF costum date format [closed]
- What template is used for viewing Media Library Files?
- get_month_link uses what wordpress template?
- Page header on specific page is different from the rest [closed]
- Differentiation between index.php and page.php
- Single-page.php template file name not shown
- Can I assign a Folder for Post Formats, without it affecting WordPress’ fallback/hierarchical system?
- How to display custom post type?
- Assigning custom page templates to a static blog page
- Archive-custome_post.php template not working
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- Organize template parts and page templates in folders in regards of template hierarchy
- Help Understanding Template Hierarchy
- Parent/Child themes – both CSS files loaded
- User role templates
- Assign template to custom page type?
- Child theme enqueueing style.min.css not style.css
- BuddyPress : how can I call the template WordPress would have chosen (template hierarchy)?
- Which template(s) to override to use a different sidebar for blog, single posts, categories, blog archive?
- Why would adding a template file to a child theme cause an error in template-loader.php?
- Single Post Templates Doubt
- WordPress Child Theme Template auth_redirect wrapper
- How can I add some blocks to template without changing template file?
- Page Templates Used in Custom Post Type
- custom template – override plugin template in child theme – issue with scripts
- Show a custom template, no matter the page being viewed, if the user is not logged in
- How to set the background color of a template part (Header/Footer) in Twenty Twentythree?
- Category theme template becomes default template for child theme
- Difference Between Block Templates and Site Editor Templates
- How to use Class
in Java? - Get name of the current template file
- How do you find out which template page is serving the current page?
- How to change the default registration email ? (plugin and/or non-plugin)
- Opinions and recommendations on the best barebones base theme [closed]
- How do I get the size of an attachment file?
- Is there any way to use get_template_part() with folders?
- single-{$post_type}-{slug}.php for custom post types
- Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?
- How can i change email template for new user
- Any advantage to using get_header() over include(‘header.php’)?
- Enable page templates. How?
- Use [embed] filter in template files
- What’s the purpose of the paged.php file?
- How do you access the Product Short Description in a WooCommerce email template? [closed]
- Prevent comments_template() to load comments.php
- Is there a way to list all used/unused WP templates?
- Page editor missing Templates drop down
- Print WordPress template filename(s) for debugging
- How to force TinyMCE in WordPress to replace newlines with tags and not with
- How to find the posts page (home page) programatically
- WooCommerce: Change template for single product page
- View WordPress page template usage (or unused)
- How to edit contents of dynamic_sidebar()?
- How to check if a shortcode exists?
- Where is get_header(‘shop’) file in Woocommerce templates
- Custom templates folder
- What is the link to my default “archive” page?
- How to get slug of current category in taxonomy template?
- How to show a under construction page for a domain but still be able to work on index.php?
- Change the name of the ‘Default Template’
- Customizing get_the_excerpt() to specific length and “Read More” output.
- How to Rename a Template File?
- Template for specific post of custom post type
- get page templates
- Echoing Elementor page content in template, but it doesn’t get styles and some widgets are missing
- Using WordPress templating for HTML emails
- How to override the “inc” folder (or any folder) in a theme using child theme?
- Is it possible to manipulate the list of page templates?
- WP frontend output of custom textarea fields not respecting line breaks. In admin it’s OK
- How do you check if a WordPress template file exist?
- Multiple Single Post templates