WordPress.org

Ready to get started?Download WordPress

Forums

Exclude slideshow on subpages (3 posts)

  1. Internetoholik
    Member
    Posted 2 years ago #

    Hello there,

    So here is my problem. I have this site:
    http://www.spinnakerfin.com/

    There is 3 slideshows which I want to work only on Home, Blog, About us and Contact us. I need to get static slide "retirement" on Retirement page and "business owners" on Business owner page. So I get an idea i will exclude slide show on this pages using PHP but I am not very big fan on this language.

    Can you tell me how will look like simple code that will exclude slideshows on this 2 pages and instead make 2 static jpg's?

    Thanks in advance ;-)

  2. Pierrick
    Member
    Posted 2 years ago #

    Use conditional tags in your header.php file

    http://codex.wordpress.org/Conditional_Tags

  3. Internetoholik
    Member
    Posted 2 years ago #

    That's what I made on my own. I'm totally new to php, i was making this at the same time learning php language:

    <div class="banner"
    <?php
    if(is_page('retirement')) { echo 'class="retirementpage"'; }
    elseif(is_page('business-owner')) { echo 'class="businessownerpage"'; }
    ?>>

    and

    .retirementpage {
    background:url(http://www.spinnakerfin.com/wp-content/uploads/2011/06/slide_31.jpg) no-repeat;
    }

    .businessownerpage {
    background:url(
    http://www.spinnakerfin.com/wp-content/uploads/2011/06/slide_21.jpg);
    }

    But it is not working. What am I doing wrong? I think i need to disable this plugin on this subpages but I have no idea how to do it.

Topic Closed

This topic has been closed to new replies.

About this Topic