Conditional Tag For Home page ONLY
Hi
I am using a slider plugin and want a slider to run on the home page (example.com) and not on any other pages. The template code for the slider is Code:
<?php echo do_shortcode(‘[layerslider id=”3”]’) ?> Code:
<?php is_home(); ?><?php echo do_shortcode(‘[layerslider id=”3”]’) ?><?php endif; ?> I am on WP 3.5 and Ata 3.7.10 |
If you are want to test a condition, you need the 'if'
HTML Code:
<?php if (is_home()) { echo do_shortcode(‘[layerslider id=”3”]’); } ?> |
All times are GMT -6. The time now is 08:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.