WordPress Sitewide Top Bar

If you hadn’t noticed ( you probably did ) I now have a site-wide Top Bar that allows me to list a link or two in. I can sell these or get my visitors attention to the new most important things.

I tried downloading various plug-ins to do this for me, but I decided to code one myself as they all had to have their link on it to use it ( how low pro ) but now things are looking good and work great.

Anyways, I thought I would freely share my code with you all so that you can have this on your own blog to, its easy html and css to implement so lets get started!

Alright, well first things first. Lets load up our header.php file and place the following code right after the tag in header.php. This is the actual link text and codes so be sure to change it to whatever you believe is most important on your blog.

<!– InfectedByBugs Top Code –>
<div class=”across-the-top”>
 <a class=”alink2″ href=”
http://www.infectedbybugs.com/2008/03/04/make-an-easy-2500/”>Win$25.00, Just Subscriber To Our Feed!</a> – <a class=”alink2″ href=”mailto:support@infectedbybugs.com”>Advertise Here $25.00/mo</a></div>
 <!– InfectedByBugs Top Code –>

After that is placed you need to define the css within your css file called style.css. On the style.css file place this as the very top or very bottom for easy access to change colors and such later on.

/* *******************************
InfectedByBugs Top Bar CSS, feel free to change the colors!
* ****************************** */
.across-the-top { color: #fff; font-size: small; font-weight: bold; background-color: #6b6b6b; background-position: 0 top; text-align: center; width: 100%; height: 10px; padding-top: 5px; padding-bottom: 5px; border-bottom: 2px solid #343434; }
.alink2 { color: #fff; font-size: small; font-weight: bold; }

/* *******************************
End InfectedByBugs Top Bar CSS
******************************* */

If you find this WP plugin helpful show your love by linking back to us somewhere on your blog! Feel free to comment below with your thoughts on this simple plugin as well!

Filed under: Personal Posts

Like this post? Subscribe to my RSS feed and get loads more!