Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] Generate Sections, problem with home page

Home Forums Support Generate Sections, problem with home page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #177768
    Daniel Walker

    Hi Tom,

    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.

    Kind regards,
    Dan

    #177831
    Tom
    Lead Developer
    Lead Developer

    Hi Dan,

    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 🙂

    #177966
    Daniel 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!

    Kind regards,
    Dan

    #178068
    Tom
    Lead Developer
    Lead Developer

    Ah, glad you figured it out! You may have just had a PHP error in there 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.