• Hi, I’ve created a child theme but I’ve a big problem with functions.php of child theme.
    If I add this file on child theme folder, as you can see on https://www.pim5stelle.com appear a white line on top of the site.
    If I remove the child functions.php the blank line disappear.
    If I delete everything on child functions.php the blank line appear again.
    How can i solve it?
    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • What theme are you using? Can you post the contents of your child theme’s functions.php to Pastebin and post the link here? Can you temporarily enable debugging and see if any errors appear?

    Thread Starter ironivan89

    (@ironivan89)

    Theme is classiads theme but the problem isn’t with the theme but with my file functions.php because if I delete everything from the file the problem still appear. The debug list 4 notification that are also in the original theme.

    The code pasted is at https://pastebin.com/P8jeRrDs

    Thanks

    I’m not sure how helpful I can be, given that I don’t have access to your parent theme. Have you spoken to your theme’s vendors for assistance? After all, that’s part of what you paid for.

    If you switch to the parent theme, does the line appear? Can you temporarily enable debugging and see if any errors appear, and if so, can you list them?

    Thread Starter ironivan89

    (@ironivan89)

    Yes. Theme’s support tell me that The problemi is my file child functions.PHP, in fact, if i switch to parent theme, the line doesn’t appear and if i remove my child functions.PHP The line doesn’t appear. Have you seen something wrong in my functions.PHP code?
    Thanks

    When I use your code in a child theme with debugging enabled, I receive this error:

    Warning: Creating default object from empty value in functions.php on line 23

    This is line 23:

    $wp_taxonomies['provincia']->cap->assign_terms = 'edit_province';

    Do you receive any errors when you have debugging enabled?

    Thread Starter ironivan89

    (@ironivan89)

    No, i don’t get this error because I have created The custom taxonomy “provincia”. Probably you get this error because you don’t have this custom taxonomy. But I can’t understand why deleting all functions in The file I get always the white line!

    Can you temporarily enable debugging and see if any other errors appear? Can you make sure there’s no white space prior to the opening PHP tag on line 1 or after the final comment on line 62?

    Thread Starter ironivan89

    (@ironivan89)

    No white space before the <?php and after last comment.
    I’ve enabled debug but notifications are the same that appear if I remove the child functions.php so they appear also when the white line doesn’t appear.

    Thread Starter ironivan89

    (@ironivan89)

    I’ve disabled the debug because I’m trying to correct the file functions.php, what the debug say is:

    Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /var/www/vhosts/iaconettiarchitets.com/pim5stelle.com/wp-includes/functions.php on line 3457 Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /var/www/vhosts/iaconettiarchitets.com/pim5stelle.com/wp-includes/functions.php on line 3457 Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /var/www/vhosts/iaconettiarchitets.com/pim5stelle.com/wp-includes/functions.php on line 3457 Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /var/www/vhosts/iaconettiarchitets.com/pim5stelle.com/wp-includes/functions.php on line 3457 Notice: Il metodo di costruzione richiamato per WP_Widget è deprecato dalla versione 4.3.0! Utilizzare invece
    __construct()
    . in /var/www/vhosts/iaconettiarchitets.com/pim5stelle.com/wp-includes/functions.php on line 3457 Notice: Undefined index: header-style in /var/www/vhosts/iaconettiarchitets.com/pim5stelle.com/wp-content/themes/classiads child/header.php on line 66

    Thread Starter ironivan89

    (@ironivan89)

    I’ve solved! Probably there was some invisible character on file functions.php because I’ve rewritten the file from the beginning, uploaded it and white line has disappeared!
    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘problem with child functions.php’ is closed to new replies.