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
- Get name of the current template file
- How do you find out which template page is serving the current page?
- How do you access the Product Short Description in a WooCommerce email template? [closed]
- View WordPress page template usage (or unused)
- Template for specific post of custom post type
- How do I get the URL of a specific size featured image?
- How can I set up a category “overview” page?
- Create Page that uses specific template
- Sharing templates with the JSON API?
- Prevent private post 404
- Where is the /blog/ url set from?
- Single page template for custom post_type
- NextGen Gallery template cache [closed]
- Adding variable to get_template_part
- Set template based on query in URL
- Template tags for Buddypress
- ACF image field to WordPress featured image
- How to display only an excerpt of the content with custom post types?
- get_template_part returns NULL
- ACF – Theming Flexible Content
- Display “large” image size and show caption in attachment page
- For custom templates, is it better to use `template_include` or `type_template`?
- How to delete read more span on single post view?
- WordPress editable template fields
- Conditionally display different images before the content in a page template
- Show all parts in multipage post
- One of my pages uses the archive.php template only. Why?
- Why are 404s not triggering my 404.php template?
- How do I create a custom archive page depending on the custom taxonomy type?
- Is there a way to create a block template that is not limited to a post type?
- All top-level pages are using index.php as template
- link to non-category page routed to category template
- Can’t format content of Rich Text Editor in Template
- get_file_data to read data for Custom Template File?
- What’s the purpose of $wp_did_header?
- Trying to display short code content in template file with do_shortcode()
- How to use index.php as a template for archives?
- How to customize WooCommerce templates to avoid override upon update [closed]
- How to create a archive template for custom post type [duplicate]
- Why wordpress custom template comments shows Undefined index?
- Why is this array not working?
- Custom Archive with Content for Custom Post Type
- Display A Post At A URL without Redirecting