• Hello,

    After having updated the theme, my website front-end is showing this error message:

    Fatal error: Uncaught Error: Call to undefined function generate_do_element_classes() in /home/adoptpro/public_html/adoptprof.be/wp-content/themes/generatepress_child/index.php:20 Stack trace: #0 /home/adoptpro/public_html/adoptprof.be/wp-includes/template-loader.php(74): include() #1 /home/adoptpro/public_html/adoptprof.be/wp-blog-header.php(19): require_once(‘/home/adoptpro/…’) #2 /home/adoptpro/public_html/adoptprof.be/index.php(17): require(‘/home/adoptpro/…’) #3 {main} thrown in /home/adoptpro/public_html/adoptprof.be/wp-content/themes/generatepress_child/index.php on line 20

    Could you help me to resolve that please?

    Thank you in advance!

    Regards,
    Issam

Viewing 12 replies - 1 through 12 (of 12 total)
  • Theme Author Tom

    (@edge22)

    Hi there,

    generate_do_element_classes() is a new function in GP 2.2.

    If your child theme is using it, you need to make sure your parent theme is running at least 2.2.

    Let me know if that helps or not πŸ™‚

    Thread Starter issami1

    (@issami1)

    Thank you for your answer.

    I did check the parent theme version installed, and indeed it is 2.2.1

    Thank you for help!

    Theme Author Tom

    (@edge22)

    In that case, the function should be defined: https://github.com/tomusborne/generatepress/blob/2.2.1/inc/markup.php#L20

    Perhaps your server has caching which is still serving the old files?

    Thread Starter issami1

    (@issami1)

    I renamed the child theme and re installed it through the zip file. Then I copied functions.php and styles.css from the last child version and things seem to be right.

    Could this be a solution?

    Thank you!

    Theme Author Tom

    (@edge22)

    As long as the parent theme is installed correctly, you should be good to go.

    Make sure your child theme functions.php file only has your custom functions in it. It shouldn’t have anything from the parent theme functions.php file.

    Thread Starter issami1

    (@issami1)

    Thank you. Yes, my child theme functions.php file contains only the custom functions.

    I have one last question about the child theme please, is it possible that it doesn’t contain any index.php file?

    Thank you in advance!

    Theme Author Tom

    (@edge22)

    Yes, it doesn’t have to. You would only need an index.php file if you need to overwrite the one that exists in the parent theme.

    Thread Starter issami1

    (@issami1)

    Thank you so much for your support!

    Best regards,
    Issam

    Theme Author Tom

    (@edge22)

    No problem! πŸ™‚

    Thread Starter issami1

    (@issami1)

    Hello Tom,
    I hope you’re doing well.
    Is it possible to delete this thread from your forum please because it is appearing on the first searching page on Google.

    Thank you for your comprehension!
    Regards.

    Theme Author Tom

    (@edge22)

    Hi there,

    Unfortunately, I don’t have control over topics here on WordPress.org. You could try asking the moderators, but I don’t believe they delete topics for that reason.

    Thread Starter issami1

    (@issami1)

    Okay I will try with them. Thank you

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Fatal error: Uncaught Error’ is closed to new replies.