SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Zapppa's Avatar
    Join Date
    Aug 2009
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help needed for simple change

    Hi,

    I am using a slideshow on a blog site I am making. At the moment I have it displaying on all pages apart from the home page.

    I want it only on the home page though.

    I know its a simple process of putting some declarations somewhere but I am hopeless at PHP...if someone could tell me what I need to do I would be very thankful.

    Here is the code which calls the slidehsow on the pages:


    Code PHP:
    <?php if (is_home()) { } Else { ?> 
     
     
    <div class="nivoSlider">
      <img src="http://allgonep.fu8.com/wp-content/themes/graphene/images/slide_images/1_crystal_fighters.jpg" title="hello" />
      <img src="http://allgonep.fu8.com/wp-content/themes/graphene/images/slide_images/2_you_are_music.jpg" title="test" />
      <img src="http://allgonep.fu8.com/wp-content/themes/graphene/images/slide_images/3_monica.jpg" title="dudes" />
      <img src="http://allgonep.fu8.com/wp-content/themes/graphene/images/slide_images/4_the_magic_numbers.jpg" title="test 2" />
    </div>
     
     
     <?php } ?>


    Do I need to put the HTML in between the { } ?

    If so what pho tags do i need to do?

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,096
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Remove "} Else {" from the code
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Addict Zapppa's Avatar
    Join Date
    Aug 2009
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much!!!



    CSS and HTML is second nature to me, but PHP is so confusing.

    Do you have any good resources where I can learn easily and quickly?

  4. #4
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,096
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Zapppa View Post
    Do you have any good resources where I can learn easily and quickly?
    The PHP tutorial on w3schools isn't half bad. If you'd rather read a book I hear Build Your Own Database Driven Web Site Using PHP & MySQL from Kevin Yank is very good.
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •