In 2016 theme, how can I force all single attachment posts to use content-attachment.php rather than image.php?

There’s a couple things you could do. If we follow the Template Hierarchy you could rename your content-attachment.php file to attachment.php and remove image.php. This will ensure that the image view will fallback to attachment.php. If you want to use content-attachment.php then you could use the template_include hook to tell WordPress to load in which … Read more

Post archive is not using the assigned template

Question: why doesn’t it use news.php? This is due to a design decision. If you look at the diagram for the Template Hierarchy, you will notice that the Blog Home page type (black box) has a line connecting directly to the home.html primary template (blue box) with no options in between. If you go to … Read more

Unload templates; disable parent Template Parts using only “theme.json”

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 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)