The title basically says it. I currently have my home page with the HTML sitting in the classic editor box. Should I move that to front-page.php? I know that it doesn’t REALLY matter, and it won’t have a huge impact, but I am being meticulous about creating a speedy website. So which is faster?
Also, I am currently using 2 separate PHP files for headers. One on the home page, and one for the rest. Should I just hard code the header for the home page into the same place as the home page HTML since it’s the only page that uses it?
I’m pretty new to PHP, but I’ve searched Google extensively and can’t seem to find my answer. Using WordPress. Really appreciate your help!
2
Answers
For speeding up the website, no need to change the home page or the header file. please do the following things for speeding up the website
Moving the html code to a template file will improve the site speed because WordPress will not have to retrieve those html tags from the database. And it is conventional and actually a good practice to place all rendering code (html, css, js) to the template or theme files where they should be, instead of directly adding them in the backend or instead of including them directly in the post editor.