Happy Halloween! Get 20% off GP Premium with the discount code: HALLOWEEN20

Reply To: Forefront Theme Update Question Regarding Header

Home Forums Support Forefront Theme Update Question Regarding Header Reply To: Forefront Theme Update Question Regarding Header

#207638
Tom
Lead Developer
Lead Developer

From what I can see, you can do this instead of adding the header.php file:

add_action( 'generate_after_header_content','kenneth_add_weather' );
function kenneth_add_weather()
{
    ?>
    <div id="current-weather">
        <iframe src="http://builder.zoomradar.net/weather_builder/widget.page.php?s=160x160&z=28607&i=1&c=1" width="160" height="160" style="border:0" frameBorder="0"></iframe>
    </div>
    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
        <div>
            <input type="text" size="10" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
            <input type="submit" id="searchsubmit" value="Search" class="btn" />
        </div>
    </form>
    <?php
}

add_action( 'generate_inside_container','kenneth_add_ticker' );
function kenneth_add_ticker()
{
    if(function_exists('ditty_news_ticker')){ditty_news_ticker(306350);}
}

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

Hooks are awesome 🙂