Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Using bar1 or bar2 for Javascript?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
 
Prev Previous Post   Next Post Next
  #1  
Old Sep 29, 2009, 04:40 PM
paulae's Avatar
paulae
 
1,332 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Using bar1 or bar2 for Javascript?

In trying to make my page load faster, and especially to make the very beginning of the page to show up faster without a long lag-time, I'm trying to make the things that load first be very light-weight. I had a plugin in the left sidebar to show the current date, as any news site should have. Plugins seem to be rather heavy in the way they use the browser, so I am looking for another way. Ideally, I would like the date to show up below the top banner ad, which would be a nice location for bar1. I would like to be able to put Javascript in there, like this:
Quote:
<script language="javascript" type="text/javascript">
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thu rsday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May"," June","July","August","September","October","Novem ber","December")
document.write("<small><font color='FFFFFF' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</b></font></small>")
</script>
At the moment, I've inserted it into the HTML Insert area for the header, and it's showing up at the very top of the container. Not where I want it, ultimately.

Any way I can do what I want? I saw a thread earlier about putting text in the /functions/bfa_ata_header_config.php file where the bar code is, but I don't know how to put Javascript there without ending up with an ugly parse error.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Content into Header Bar %bar1 Steve_T Header configuration & styling 14 Apr 7, 2012 09:10 PM
[SOLVED] Aesthetic Changes - Adding Image To Bar1, Adjusting Footer/Copyright Layout mannitol Atahualpa 3 Wordpress theme 8 Oct 3, 2009 02:03 AM
[SOLVED] How to import a widget' into %bar1 or 2 ? Sakshin Page & Category Menu Bars 2 Sep 15, 2009 06:18 PM
[SOLVED] Bar2 Navigation: How To Impliment rockport Header configuration & styling 4 Jun 12, 2009 10:59 AM
Minimum size for bar1 / bar2 in windows? mcphoto Header configuration & styling 2 May 11, 2009 03:36 PM


All times are GMT -6. The time now is 12:24 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.