Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

[SOLVED] header.php altered to call js - works well EXCEPT on post (site.com/archive/


  #1  
Old Oct 25, 2010, 03:42 PM
arthurmild
 
50 posts · Aug 2010
Cape Town
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.



Extract from altered header.php follows


Code:

 	<link rel="stylesheet" href="wp-content/themes/atahualpa/newsticker.css" type="text/css" />
   	<script type="text/javascript" src="wp-content/themes/atahualpa/js/prototype.js"></script>
   	<script type="text/javascript" src="wp-content/themes/atahualpa/js/effects.js"></script>
    	<script type="text/javascript" src="wp-content/themes/atahualpa/js/newsticker.js"></script>
</head>
<body <?php body_class(); ?><?php if ($bfa_ata['html_inserts_body_tag'] != "") { echo ' '; bfa_html_inserts($bfa_ata['html_inserts_body_tag']); } ?>>
<?php bfa_html_inserts($bfa_ata['html_inserts_body_top']); ?>
<div id="wrapper">
<div id="container">

	<div id="newsticker">
        	<ul>
            	<li>10 000 copies monthly</li>
            	<li>Glossy Lifestyle Magazine</li>
            	<li>Distributed to “A” Income areas</li>
            	<li>Established since 2006</li>
	   	<li>Read Cover-To-Cover</li>
		<li>Long Shelf Life and Ongoing Exposure for Advertisers</li>
		<li>Generating top quality leads</li>
		<li>Professional, targeted distribution with ZERO wastage</li>
        	</ul>
    	</div>


<table id="layout" border="0" cellspacing="0" cellpadding="0">
  #2  
Old Oct 25, 2010, 09:29 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Last edited by lmilesw; Oct 25, 2010 at 09:33 PM.
  #3  
Old Oct 26, 2010, 11:10 AM
arthurmild
 
50 posts · Aug 2010
Cape Town
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 !

Bookmarks

Tags
header.php, javascript



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add PHP to the loop on multi- and single post pages only? Fux Center area post/pages 2 Jun 16, 2010 05:55 AM
[SOLVED] NextGenGallery Upgrade Altered Config of Center Page Widget Craig Mattice Plugins & Atahualpa 6 Mar 22, 2010 02:14 PM
Lightbox 2 (Argento version) works on all pages but homepage Wyro Plugins & Atahualpa 13 Dec 5, 2009 03:05 PM
Fatal error: Call to undefined function: is_tag() in bfa_get_options.php jmenge Atahualpa 3 Wordpress theme 2 Sep 8, 2009 07:10 AM
Problem in archive.php jrodon Atahualpa 3 Wordpress theme 1 Feb 15, 2009 07:03 AM


All times are GMT -6. The time now is 11:10 PM.


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