• Hi

    I am building a child theme and it contains a functions.php with multiple hooks and filters. I have noticed that if i give the code some space in between other codes a slowdown occurs when I activate or deactivate plugins. I get a white blank screen so that I need to click the browsers back button. I have checked online and read that it is an error in WordPress causing this blank white screen.

    I had to smack the code together and then take it all out and paste one code in at a time. In the end I was able to get it working just fine. Activating and deactivating plugins worked smoothly again. Just the next time I add new code I am worried that the error will begin acting up again.

    I do hope there is a good solution to this. I would like to have a comment line between the code to make it better visually.

Viewing 1 replies (of 1 total)
  • Thread Starter Paal Joachim Romdahl

    (@paaljoachim)

    I found the answer to this puzzle.

    My functions.php file contained too many php open and close tags.
    For every section of code I had an open and a close tag.
    There is no need for this. It is a lot simpler.

    Just one open php tag is needed (if no extra html code to be outside of the php tag is added). So all the open and close tags were removed except the initial php opening tag. From having a bunch of open and close tags I was left with only one php tag at the top.

Viewing 1 replies (of 1 total)
  • The topic ‘Child theme functions.php and invisible characters causing errors.’ is closed to new replies.