WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] functions.php (empty) causes Child to fail. Why? (4 posts)

  1. rixtertrader
    Member
    Posted 1 year ago #

    My child theme works fine with just the one file (styles.css) in the directory.

    As soon as I add functions.php, it no longer works. Funny thing, even an empty functions.php or one with just <?php ?> and nothing more will cause the theme to fail.

    How does it fail?

    When you click on UPDATE, whether for adding posts/categories or editing, it returns a blank page. No errors. You just get a blank page. I've tried different browsers also just to make sure.

    Weird!

    Anyone ever hear of this happening...and why?

    TIA

  2. rixtertrader
    Member
    Posted 1 year ago #

    The problem is if there are any blank lines in the functions.php file.

    Make sure there are no blank (empty) lines following the last line of code.

    :-)

  3. That's probably it. Don't close the functons.php file just make it something like

    <?php
    // Your PHP goes after here

    See if that does it for you.

  4. rixtertrader
    Member
    Posted 1 year ago #

    As posted prior, you simply need to be sure there are no empty lines at the end of the file.

    All is good now. Thx.

Topic Closed

This topic has been closed to new replies.

About this Topic