• Hatul666

    (@hatul666)


    I recently finished building my WP theme (child theme of twentyfifteen). My friend started updating content and accidentally added content to a page which don’t have a function that gets and displays the content.

    From since, everytime we update the template.php file – we cant see any changes on the website, moreover, we see a very old version of the website. We compared the HTML code from the website with the on in the last updated PHP file and it’s still uses the old HTML – We totally deleted the .php file of the template – and the page is still displayed!!!

    We restarted the server, we deleted all tables in the database using a plugin, and nothing!

    I started adding all pages and templates (because all the DB is deleted..), elements suddenly look strange. I changed the templates name from “Homepage Template” to “NEW Homepage Template” and I get the templates in addition to the old strange templates in the template list.

    https://i.stack.imgur.com/W9ScE.png

Viewing 1 replies (of 1 total)
  • leejosepho

    (@leejosepho)

    As best I can tell, WordPress searches all files it can see to find ‘Template: name’ lines even if said files are not meant to be Templates. Then, today I had a problem with a footer-name.php file that was identical to another one with a different file name. For whatever reason, WordPress was not reading it and was using the default file. Something I have done a few times while doing some serious editing in a Child Theme is to go to the database to clear theme_mod (that is the search I use) settings, and that seems to have helped. But overall, my biggest problems with templates have been cleared by doing a thorough inspection of anything containing that ‘Template: name’ line.

Viewing 1 replies (of 1 total)
  • The topic ‘Why WordPress gets old templates code instead of the last updated ones’ is closed to new replies.