- This topic has 3 replies, 2 voices, and was last updated 5 years, 4 months ago by Tom.
March 8, 2016 at 4:59 am #177768Daniel Walker
I’m using a child theme and my home page currently uses Sections, but I want to change it so that it doesn’t. If I change it to not use Sections, I get an http error 500 internal error when I try to open the home page.
I tried creating a new page without Sections and then setting my home page to it (in Settings > Reading), but still got the error 500. After a little more testing, I’ve found that when I set my home page to point to a page that uses Sections, it’s fine, but if I set it to any page that doesn’t use Sections, I get the 500 error.
If I deactivate the Generate Sections plugin (v1.0.14), I get the 500 error no matter what page I set to be my static home page.
If I switch back to the Generate Press theme (v1.3.27), it’s fine and I can set any page to be the home page, so I guess it must be something about my child theme that’s not playing nicely with Generate Sections.
Previously, I have added a function in my functions.php to add Sections to posts and a custom post type. I haven’t done anything else to change Sections behaviour.
Any ideas how I might trouble-shoot this one? Am I going to have to switch on the wp debug messages on my live site?
The only other thing to note is that I’m running WordPress 4.3.3, so I should probably update that to 4.4.2.
DanMarch 8, 2016 at 10:46 am #177831TomLead DeveloperLead Developer
That’s very strange – try removing the code you added to functions.php.
If that doesn’t work, check your error_log file, which will contain a more specific error so we know what’s going on.
Let me know – we’ll figure it out 🙂March 9, 2016 at 1:44 am #177966Daniel Walker
Hi Tom, I’ve made some progress. Unfortunately I can’t access the error_log file on our host’s shared webserver, but I think the problem was with the template being used to display the home page when I’d set Sections to No. I noticed a front-page.php in my child theme folder which was essentially the same as page.php except I’d stripped out the comments-area loop section and the php file comments – /* … */
I swapped that out and replaced it with a copy of page.php from the GeneratePress theme (I renamed it page-home.php) and now the home page loads fine without Sections.
Not sure why I had a front-page.php in my theme folder. Probably the detritus of my early WordPress experiments, and it came back to haunt me. I have to admit I still don’t fully understand the template hierarchy!
DanMarch 9, 2016 at 12:17 pm #178068
- You must be logged in to reply to this topic.