ThemeShaper Forums » Thematic

[closed]

Issue with action hook

(6 posts)
  • Started 4 years ago by crzy4prple
  • Latest reply from Jonny Janiero
  • This topic is not resolved
  1. crzy4prple
    Member

    I'm trying to add the following to the belowheader hook, for some reason it's not working.

    function childtheme_slideshow() {
    
    if (function_exists('wp_flash_img_show')) {wp_flash_img_show();} 
    
    add_action('thematic_belowheader','childtheme_slideshow');}

    I have no idea what I'm doing wrong. The only other thing in my function file is the new menu thing for 3.0 and the custom background.

    Posted 4 years ago #
  2. crzy4prple
    Member

    please please can I get some help?

    Posted 3 years ago #
  3. had a little look
    got it working, see demo
    http://www.dev.virtualpudding.com/

    i pasted the following in functions.php

    function childtheme_slideshow() { ?>
    <div id="flash-container">
    <?php if (function_exists('wp_flash_img_show')) {wp_flash_img_show();}  ?>
    </div>
    <?php }
    
    add_action('thematic_belowheader','childtheme_slideshow');

    wrapped in div so i could style

    #flash-container {
        width:960px;
        margin:0 auto;
        overflow:hidden;
        position:relative;
    }

    obviously, style as you wish.
    hope this helps. if so, mark post as resolved

    Posted 3 years ago #
  4. i think the only mistake you made was the extra

    }

    at the end

    Posted 3 years ago #
  5. crzy4prple
    Member

    Oh Jonny you're my hero!!! Thanks so much!!!!

    Posted 3 years ago #
  6. glad it helped.
    mark this topic as resolved

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.