<?php
if($this->getConfig('porto_settings/general/show_site_notice')) {
    $static_block_id = $this->getConfig('porto_settings/general/custom_notice_block');
    $block = $this->getLayout()->createBlock('Magento\Cms\Block\Block');
    if($block) {
        $block->setBlockId($static_block_id);
    }
    if($block){
        echo $block->toHtml();
    }
}
?>