Forefront Theme Update Question Regarding Header

Home Forums Support Forefront Theme Update Question Regarding Header

Home Forums Support Forefront Theme Update Question Regarding Header

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #207095
    Kenneth

    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.

    #207150
    Tom
    Lead Developer
    Lead Developer

    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.

    #207426
    Kenneth

    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.

    #207462
    Tom
    Lead Developer
    Lead Developer

    Can you show me your header.php file? Preferably in a pastebin? http://pastebin.com/

    #207635
    Kenneth

    Are you able to see it here http://pastebin.com/YCu05efR

    #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 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.