Site logo

Archived topic

Forefront Theme Update Question Regarding Header

5 replies · Started by Kenneth on July 6, 2016

Viewing posts 1–6 of 6

I am using the Forefront theme and up until now had not been using the Simple CSS plugin. Upon testing the plugin today I am able to save my Stylesheet.css changes in it with no problem, however the same can not be said for my header.

I have been using a header.php file, of which the original Forefront theme does not contain. My question is, in using a header.php file when updates to the Forefront theme come out will it wipe out my header.php? If so then can you offer any help in how I should save that code into the CSS plugin? I tried several ways to get the header info into CSS but it never saves it quite right.

Thanks for your time.

Hi there,

That's correct, updating the theme will remove your header.php file.

It depends on what you're doing in that file? There might be a way to achieve it without having that file in there.

Otherwise, just make a backup of it and re-upload it after updating.

It's basically layout items for the header. Since that is the way I was doing it (header.php) under a former theme I'm not sure how to get the same results in ForeFront without it.

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 :)

This archived topic is closed to new replies.