[SOLVED] header.php altered to call js - works well EXCEPT on post (site.com/archive/
Hello,
I was very pleased with myself after altering header.php to allow me to display a div containing rotating text above the main header elements: happy example here However, this does not display properly on 'pages' containg posts - basically anything in the mysite.com/archives directory unhappy example here - I presume (well Ok am guessing) that there is a conflict which is not allowing the js to do its thing. - Or is there something about header.php which makes it behave differmtly on 'posts' (/archive/) pages ? - Or am I missing something very obvious here ? I hope someone can help or at leats give me a nudge in the right direction. I have had a good look around here and the WP codex, but can't quite figure this one out this time. :confused: Extract from altered header.php follows Code:
|
I am not sure what is going on but I can tell you that Atahualpa is designed with the idea of never editing the theme files directly. Sometimes for bug fixes and the like I might need to edit the theme files but for purposes like your I would probably look at putting the div in ATO>Style & edit Header Area and put it in the Configure Header Area box. The javascript might go in ATO>Add HTML/CSS Inserts>CSS Inserts>HTML Inserts: Header but I have not experimented so this is just a guess but it might giive you a "nudge in the right direction".
What I would do for this funcitonality is search for a plugin. |
Hey Larry,
Thanks for the nudge. The problem was (is) that the rotatating text div was not working on pages in sub-directories of wp-content, because the js files and css file were being referenced relatively. I changed to absolute references and all is now well e.g. of absolute reference: Code:
<script type="text/javascript" src="http://bay2.thinkingspaceweb.com/wp-content/themes/atahualpa/js/newsticker.js"></script> I took your advice about not messing with header.php (or other theme files) directly - The ATO functionality is fantastic in this respect. I can see I am going to fall deeply in love with this theme. Donation on its way - I'm sure to be back ! |
All times are GMT -6. The time now is 08:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.