PHP WordPress error – Site not working

Solution:1

Update code

<?php $hb = ot_get_option(‘home-banner’); ?>

<div class=”home-banner” style=”background: url(‘<?= echo $hb; ?>’);”

<?= $hbh = ot_get_option(‘home-banner-height’);

echo !empty($hbh) ? ‘height:’ . $hbh . ‘px;’ : ”; ?>></div>

Solution:2

Most probably thats because you are using empty() on a function return, in following line:

!empty(ot_get_option(‘home-banner-height’)) ? ‘height:’ ….
change this line to

ot_get_option(‘home-banner-height’) ? ‘height:’…
just remove the !empty()

Solution:3

Replace your code:

<div class=”home-banner” style=”background: url(‘<?= ot_get_option(‘home-banner’); ?>’);
<?= !empty(ot_get_option(‘home-banner-height’)) ? ‘height:’ . ot_get_option(‘home-banner-height’) . ‘px;’ : ”; ?>”>
</div>
With

<div class=”home-banner” style=”background: url(‘<?= ot_get_option(‘home-banner’); ?>’);
<?= echo !empty(ot_get_option(‘home-banner-height’)) ? ‘height:’ . ot_get_option(‘home-banner-height’) . ‘px;’ : ‘ ‘; ?>”>
</div>
Because, you’re echoing the height. But as your code it isn’t echoing any thing.