Home>Support>SiteOrigin Corp Child Theme Critical Error(undefined function siteorigin_setting)

SiteOrigin Corp Child Theme Critical Error(undefined function siteorigin_setting)

By Randy, 4 years ago. Last reply by Andrew Misplon, 4 years ago.

First of all, I seem to have this similar issue t and I tried the suggested fix but it didn’t work(also tried reuploading the child theme files).

It’s just weird that after updating all the plugins and WordPress version to the latest(from 5.2 to 5.3.2) installed in PHP 7.2 server. Everything works just fine until I tried switching themes and switching back again to its child theme. This produces the error log below and the site page is displaying a message “There has been a critical error on your website”.

Uncaught Error: Call to undefined function siteorigin_setting() in /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-content/themes/siteorigin-corp-child/header.php:33
Stack trace:
#0 /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-includes/template.php(722): require_once()
#1 /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-includes/template.php(671): load_template(‘/home/vxuhsh8d3…’, true)
#2 /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-includes/general-template.php(41): locate_template(Array, true)
#3 /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-content/themes/siteorigin-corp-child/index.php(17): get_header()
#4 /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-includes/template-loader.php(98): include(‘/home/vxuhsh8d3…’)
#5 /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-blog-header.php(19): require_once(‘/home/vxuhsh8d3…’)
#6 /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/index.php(17): require(‘/home/vxuhsh8d3…’)
#7 {main}
thrown in /home/vxuhsh8d3kss/public_html/qpsg_com_au/staging/wp-content/themes/siteorigin-corp-child/header.php on line 33.

Any help will be much appreciated.

As always, thank you so much for the free but wonderful themes and plugins.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 4 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Hi Randzgonz02

    Thanks for reaching out and for your support.

    To confirm, have you deleted and re-installed SiteOrigin Corp, the parent theme?

  2. 4 years, 5 months ago Randy

    Hey Andrew,

    No, I did not. The parent theme is currently installed together with the child theme. And when I switch back to its parent theme everything works just fine(but without the child-theme’s custom codes though). I also tried copying the exact header.php file from the parent to the child theme but it produces the same error. The issue is so strange as it was just triggered when I switched themes, but without doing that at first everything works just fine after all the updates(wordpress, plugins, theme).

    I can avoid this error if I restore my site from a backup and redo all the updates and just leave as it is. Meaning, I should not try switching theme as this will trigger this strange issue. Just weird.

  3. 4 years, 5 months ago Randy

    This is the exact theme I am using Theme: Responsive corporate business theme from SiteOrigin.

  4. 4 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for the update. At the moment, I’m not sure why siteorigin_setting isn’t defined, the function is contained in the parent theme. Because it’ll only take a couple of minutes, please, try deleting and re-installing the parent theme, just to rule that out as an issue.

  5. 4 years, 5 months ago Randy

    Thanks for the help so far Andrew.
    I have tried your suggestion just today but no luck. :(

  6. 4 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for trying. If possible, please, upload a ZIP copy of your child theme to wetransfer.com and send us the link. No email address required for wetranfer.

  7. 4 years, 5 months ago Randy

    Here’s the zip file of my child theme https://we.tl/t-0XR3lOSFJf.

    Please note that I have tried copying the original header.php file from the parent theme where the error occurs but it produces the same error.


  8. 4 years, 5 months ago Andrew Misplon
    Hi, I Work Here


    I’m not sure just yet, we’ll revert once we’ve had a better look.

    Other feedback:
    You’re most likely enqueuing the parent stylesheet twice due to the parent theme using a minified stylesheet by default. Please, see the enqueue in our starter child theme Page: Child Theme. To correct you can try removing the parent-style enqueue and the parent-style dependency further down where you enqueue the child CSS file.

  9. 4 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    It’s possible the issue is caused by the stylesheet header missing the Template assignment in the child theme.

    Here is the header of style.css from our starter child for Corp:

    Theme Name: SiteOrigin Corp Child
    Author: SiteOrigin
    Author URI: https://siteorigin.com/
    Theme URI: https://siteorigin.com/theme/corp
    Description: SiteOrigin Corp Child Theme
    Version: 1.0.0
    Template: siteorigin-corp
    Text Domain: siteorigin-corp
    Domain Path: /languages/

    It looks like your child is missing Template: siteorigin-corp.

  10. 4 years, 5 months ago Randy

    That solved the problem! Thank you so much, Andrew!

    It’s just strange that from the very beginning I already missed this required setting when I checked my revisions. I should have been alerted when starting or during the development, but the site was working fine.

    Once again, thank you and I’m very glad for the wonderful free plugins and themes you guys sharing. I hope I could give some donation. Keep up the good work.

    Randy :)

  11. 4 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Super, really glad to hear that helped. Thanks for your support and all the best with this project :)

    Cheers for now.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More