- This topic has 5 replies, 2 voices, and was last updated 6 years, 8 months ago by
Tom.
-
AuthorPosts
-
July 6, 2016 at 3:45 pm #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.
July 7, 2016 at 12:11 am #207150Tom
Lead DeveloperLead DeveloperHi 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.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 7, 2016 at 4:44 pm #207426Kenneth
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.
July 7, 2016 at 11:41 pm #207462Tom
Lead DeveloperLead DeveloperCan you show me your header.php file? Preferably in a pastebin? http://pastebin.com/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 8, 2016 at 12:40 pm #207635Kenneth
Are you able to see it here http://pastebin.com/YCu05efR
July 8, 2016 at 12:55 pm #207638Tom
Lead DeveloperLead DeveloperFrom 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 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.