Skip to content
Advertisement

Modifying single.php on child theme “Mikado Newsflash”

I have a website with “Mikado Newsflash” theme and a custom child theme. I can add functions on child theme and that, but if I modify single.php I get no results. Even if I delete the code on main theme it still works. Is it being called somewhere else? I’ve modified core templates such in framework/modules/blog/templates/singles and no result. Any clue on how to override single.php ?

This is the single.php theme file:

JavaScript

Advertisement

Answer

Most of the times, when an edit on a template file doesn’t change anything is because you are changing the wrong file.

Add this code to your theme’s functions.php file:

functions.php

JavaScript

When logged in, this addon will add extra information at the bottom of the page (for debug), when you load the homepage (or any other page) it will show something like this: /www/public_html/wp-content/themes/mikado-newsflash/homepage.php

This way you will know which file of your template is loaded, and you now can edit it.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement