WordPress calling “get” functions in wrong order
-
Hello,
First off, sorry I cannot provide a link to the page. It is hosted on a private dev server that I am not allowed to grant external parties access to. I can provide screenshots if necessary but that’s the limit unfortunately.
Now, the issue at hand. I have been working on a site for almost a year, and just before the winter break everything was behaving as expected. I did rigorous tests and double checked every page/event/function etc before pushing it all to GitHub.
Since returning to work I have noticed a bug where the <footer> is being called before the main <container> div so appears under the header/nav and not at the bottom of the page as it should be. I’ve checked all the files for the order of the ‘get_xxx()’ function calls and the ‘get_footer()’ is always called last, after the nav, header, and main container. I have to state I have not touched the code since mid December (minus a couple of ugly CSS changes recently trying to fix the bug), neither has anyone else in my team as I am essentially to solo developer on this project.
I’m stumped as to why WordPress would have suddenly just, as if of it’s own volition, start reordering and rendering the <footer> at the top of the page when there has been no code changes to any of the related core .php files, nor any of the config which has been left as the boiler plate code. I’ve spent a couple days digging around trying to find some cause but the issue is beyond my knowledge of WordPress and I cannot find any similar situations discussed online.
I have also updated WordPress and all Plug-Ins to see if it was a compatibility issue but the issue persists. I have also already tried switching off all the Plug-Ins, activating them sequentially to see if in some way there is an issue with the compatibility of the Plug-Ins themselves despite believing the issue to stem more from the WordPress code than the additional Plug-Ins. Again, the bug persists.
I’m now out of ideas on how to possibly fix the issue bar manually adding the <footer> to each page, which seems ridiculous as it has never been an issue, and not the most robust option. Having to change the <footer> manually for many pages if it is every updated is very unappealing. I’m aware of the ‘Menus’ editor in the admin view, but this has been what I was using in the first place and again has not been edited or touched since last year.
Does anyone have any experience with this or a similar bug occurrence? Any advice would be greatly appreciated as I’m at the end of my knowledge and experience, and none of my team has any further suggestion that haven’t already been discussed above.
Thanks in advance,
Ben
- The topic ‘WordPress calling “get” functions in wrong order’ is closed to new replies.