Homepage blank after code changes in theme

Website giving a blank when you visit the website. This happened when I entered a custom code in functions.php. But I have added the same code on many other websites with the same theme. Check the chat for more info.

  • Nithin

    Hello TheQureshi,

    Unfortunately the given cPanel access via the chat isn't working, and is giving invalid login error message when I try to login, so I wasn't able to enable debug mode.

    However, the issue is more related to your theme, as the following fatal error found in the source code of your website confirms this:

    <b>Fatal error</b>:  Unsupported operand types in <b>/home/xxxxr/public_htmlxxxx/wp-content/themes/betheme/style.php</b> on line <b>132</b><br />

    The website works fine, when I switch the theme to a default WordPress theme, the issue is only specific to your premium theme, and on giving a closer look, the only way I could help get your website to work with BeTheme is by editing the following line 112 under /wp-coontent/themes/betheme/style.php, and changing the following code from:

    <?php
    	$aFontSize = $aFontSizeDefault = array(
    		'content'	=> mfn_opts_get( 'font-size-content', '13' ),
    		'menu'		=> mfn_opts_get( 'font-size-menu', '14' ),
    		'title'		=> mfn_opts_get( 'font-size-title', '25' ),
    		'h1'		=> mfn_opts_get( 'font-size-h1', '25' ),
    		'h2'		=> mfn_opts_get( 'font-size-h2', '30' ),
    		'h3'		=> mfn_opts_get( 'font-size-h3', '25' ),
    		'h4'		=> mfn_opts_get( 'font-size-h4', '21' ),
    		'h5'		=> mfn_opts_get( 'font-size-h5', '15' ),
    		'h6'		=> mfn_opts_get( 'font-size-h6', '13' ),
    		'intro'		=> mfn_opts_get( 'font-size-single-intro', '70' ),
    	);
    ?>

    To:

    <?php
    	$aFontSize = $aFontSizeDefault = array(
    		'content'	=> '13' ,
    		'menu'		=> '14' ,
    		'title'		=> '25',
    		'h1'		=> '25' ,
    		'h2'		=> '30',
    		'h3'		=> '25',
    		'h4'		=> '21' ,
    		'h5'		=> '15' ,
    		'h6'		=> '13' ,
    		'intro'		=> '70' ,
    	);
    ?>

    Once done, your site is now loading fine. However, this looks more like an issue within your themes side. The above is more of a temporary fix. Would recommend you to get in touch with your Betheme support, so that they could help get you sorted this issue.

    I have applied the above changes in your theme as a temporary workaround, and the above edit added should be working fine in your system. I hope this helps. Please let us know if you have any further query.

    Have a great weekend ahead. :slight_smile:

    Best Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.