JS Banner Rotate and Thesis OpenHook (3 posts)

  1. Kristad
    Posted 3 years ago #

    I am trying to get the JS Banner Rotate to display in one Thesis Openhook.

    The site is currently at http://www.lynkswebservices.com/rayburns

    I have got it showing in the header area on every page - using Thesis openhooks.

    But want it only showing on the home page - so I have experimented in the footer area.

    I have put the following code in the "After_Footer" hook:
    <?php if (is_front_page()) { ?>
    image2=http://lynkswebservices.com/rayburns/wp-content/uploads/2012/10/slides-crownline1.jpg height=380 width=1000 imgdisp=5 imgfade=2 ]

    <?php } else if (is_single()) { ?>
    this is a post

    <?php } else { ?>
    this is a page
    <?php } ?>

    I can get it to show above the header on every page.
    I am experimenting with the footer to get it to go only on one page.

    It is not rotating in the footer. And it is showing on all pages.
    However my else statements are working.

    Do I need to use PHP? If so what would the code look like?
    I am new at PHP.

    Can someone please help me get this to rotate only on the home page?
    Thank you in advance...

  2. Eric Mann
    Posted 3 years ago #

    You need to do a couple of things:

    1. Use PHP. There's a function called jsbrotate() that is meant to be used as a template tag. The shortcode [jsbrotate] is only meant to be used inside post content.
    2. Don't use the old image1= API. It's been deprecated in favor of using images=

    To rewrite the code you posted as a template tag, you would use:

    jsbrotate( 'images=http://lynkswebservices.com/rayburns/wp-content/uploads/2012/10/slides-larson1.jpg|http://lynkswebservices.com/rayburns/wp-content/uploads/2012/10/slides-crownline1.jpg&height=380&width=1000&imgdisp=5&imgfade=2' );
  3. Kristad
    Posted 3 years ago #

    Thank you Eric. That seems to have done the trick :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.