If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
June 3, 2012 at 3:20 am #12964
I’d greatly appreciate assistance in making a modification to the Top Banner. I would like the banner to always remain visible (retaining the option to display whatever text is entered into the Top Banner Message box on the Theme Options page), PLUS I want to replace the ‘Close’ link in the banner to instead be a small icon that links to an external URL. I found the line of code related to the Top Banner within Propulsion’s functions.php file, but my knowledge of php is very limited. Could you kindly provide an example of the php and/or any css that is needed to accomplish these modifications. Thanks very much! – Cheers, JoelJune 3, 2012 at 7:41 am #77305
Your correct about the functions.php, just look for
<div class='infotext'>$bannerText <a class='close_info_text rounded' href='#close'>".__('close','avia_framework')."</a></div>
then replace it with this.
As far as I know this should remove the close button.
IsmaelJune 4, 2012 at 1:18 pm #77306
I need a little more help with this. And thank you for your quick response! Yes, your php modification does remove the ‘Close’ text link, however, my client wants (in the same location as the ‘Close’ text link) a shopping cart icon (e.g. cart-icon.png) that links out to an external shopping cart system that he uses… plus he still wants to be able to continue to use/change the Top Banner Message feature as needed with various sales/promotional messages.
I found the CSS related to close_info_text in the layout.css file. But I’m not sure if any of that CSS requires modification, and/or how to insert the addition of a .png image with link into the line of functions.php replacment code you provided:
So to summarize, the black Top Banner Message bar needs to:
1.) stay open/display always
2.) must be able to include message ($BannerText) input via the Theme Options ‘Top Banner Message’ box
3.) replace the ‘Close’ text link (in the same position/location within the black top message bar) with a small .png cart image that when clicked links to an external web page (his shopping cart).
Thanks kindly for the additional help, as I am still a newbie with php and CSS – Cheers, JoelJune 5, 2012 at 9:36 am #77307
You can use this. Remember to provide the top-cart.png file.
<div class='infotext'>$bannerText <a class="top-cart"><img src="..images/top-cart.png" /></a></div>
Style the image section with top-cart class on your custom.css.
IsmaelJune 5, 2012 at 4:57 pm #77308
Just having 1 minor problem with this. On some of my tests with various browsers and computers, the banner disappears. It seems that the Cookie for Top Banner is still in effect. I’d like to safely disable the cookie for the Top Banner so that the banner will always be visible (so the banner won’t disappear for my clients’ customers who may already have been cookied). Wasn’t sure what to remove in the functions.php to disable the Cookie. Thanks again.
Very appreciative of your excellent support. Cheers, JoelJune 6, 2012 at 2:57 am #77309
The topic ‘Modify Top Banner’ is closed to new replies.