I am trying to swap some content in a theme footer that is calling an option for a shortcode. I was able to get the if statement to replace when in the shop but there is only other area I'd like to have a third option, on the news page. Can I please get some help with this else if statement... It is only recognizing the Woocommerce instance and not the single News page...
<?php if ( ! $disable_prefooter && woodmart_get_opt( 'prefooter_area' ) ): ?>
<div class="woodmart-prefooter">
<div class="container">
<?php if ( is_woocommerce() ): ?>
<?php echo do_shortcode( woodmart_get_opt( 'prefooter_area' ) ); ?>
<?php elseif ( is_page( $page = 'News' ) ): ?>
<?php echo do_shortcode( '[html_block id="3542"]' ); ?>
<?php else: ?>
<?php echo do_shortcode( '[html_block id="3557"]' ) ?>
<?php endif; ?>
</div>
</div>
<?php endif ?>
Aucun commentaire:
Enregistrer un commentaire