Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Slider only on Front page (http://forum.bytesforall.com/showthread.php?t=9633)

bswb97 Sep 13, 2010 08:08 PM

Slider only on Front page
 
I'm using Smooth Slider to showcase featured content, but I've only been able to put it above the loop on the main index template. This causes it to show up anywhere. Where can I put it so that it only shows up on the home page?

juggledad Sep 14, 2010 03:43 AM

wrap the html in a PHP if statement
HTML Code:

<?php if (is_front_page) { ?>
your html here
<?php }; ?>


bswb97 Sep 15, 2010 12:38 AM

Smooth Slider is actually called with a PHP statement:

PHP Code:

<?php if ( function_exists'get_smooth_slider' ) ) {
     
get_smooth_slider(); } ?>

I tried this:

PHP Code:

<?php if (is_front_page
if ( 
function_exists'get_smooth_slider' ) ) {
     
get_smooth_slider(); } ?>

But that didn't seem to make any difference. I'm sure this will work but what's the right way to wrap the statement?

juggledad Sep 16, 2010 07:36 AM

try this
HTML Code:

<?php if (is_front_page) { 
        if ( function_exists( 'get_smooth_slider' ) ) {
    get_smooth_slider(); } }?>


paulae Sep 16, 2010 10:47 AM

No need to mess with the theme files. In the theme options, style and edit center column/content above the loop, just put
Code:

<?php
if (is_home() AND function_exists( 'get_smooth_slider' ) ) {
    get_smooth_slider(); } ?>

I use it on http://aghca.org.

Henrietta Sep 16, 2010 11:46 AM

Thanks so much for this post! I am feeling pretty darn good about being able to figure this out with the help here! I got the Easing Slider Plugin to work and show only on my home page using this code in Above the Loop!

<?php if( is_front_page() AND function_exists('easing_slider')) { easing_slider(); } ?>

Woot :)


All times are GMT -6. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.