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 »

Adding AdServe to the header


  #1  
Old Apr 18, 2009, 10:04 PM
dahljh
 
2 posts · Apr 2009
I can successfully add the plugin AdServe to footer.php with this code:
Code:
<?php AdServe("LeaderBoard") ?>
I have added a row of ads at the top of the header (bfa.header.config) with code instructions I got from this forum.

Code:
// Ad Banner Area
$logo_area .='
<td rowspan="2" valign="middle" class="header-banner">
<a href="http://www.mywebsite.com/?page_id=38" target="_self"><img src="../wp-content/ads/yourbannerhere.jpg" width="234" height="60" border="0"></a>
</td> 
<td rowspan="2" valign="middle" class="header-banner">
<a href="http://www.mywebsite.com" target="_blank"><img src="../wp-content/ads/Woods Household 468 x 60.jpg" width="468" height="60" border="0"></a>
<td rowspan="2" valign="middle" class="header-banner">
<a href="http://www.mywebsite.com/?page_id=38" target="_self"><img src="../wp-content/ads/yourbannerhere.jpg" width="234" height="60" border="0"></a>
</td> 
';
// END Ad Banner Area
Now, when I try and add the code for AdServe (so that it rotates ads) in place of the <a href> it will not work.

Anyone with suggestions?
  #2  
Old Apr 19, 2009, 08:34 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The second code you posted from bfa_header_code is already inside PHP open/close tags. To put PHP code somewhere inside there you'd have to add it like this

PHP Code:
 ' . AdServe("LeaderBoard") . ' 
instead of this

PHP Code:
 <?php AdServe("LeaderBoard"?>
  #3  
Old Apr 19, 2009, 08:03 PM
dahljh
 
2 posts · Apr 2009
Thank you for the fast response. It works, the ads now show. One problem, I added the AdServe code to the middle (2nd) spot, but it puts it in a separate row on top of the others.

Code:
// Ad Banner Area
$logo_area .='
<td rowspan="2" valign="middle" class="header-banner">
<a href="http://www.mywebsite.com/?page_id=38" target="_self"><img src="../wp-content/ads/yourbannerhere.jpg" width="234" height="60" border="0"></a>
</td> 
<td rowspan="2" valign="middle" class="header-banner">
' . AdServe("TopBanner") . '
<td rowspan="2" valign="middle" class="header-banner">
<a href="http://www.mywebsite.com/?page_id=38" target="_self"><img src="../wp-content/ads/yourbannerhere.jpg" width="234" height="60" border="0"></a>
</td> 
';
// END Ad Banner Area
Before, the ads were displayed all in one row, 1st, 2nd, and 3rd. Any ideas?
  #4  
Old Apr 20, 2009, 08:44 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You have not closed the second TD with </td>

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding header image ZHowl Header configuration & styling 27 Jul 31, 2009 06:30 PM
adding more than one pic/logo to the header area PJK Header configuration & styling 1 May 31, 2009 06:50 PM
adding space between rotating header and category dropdown menu smkpbk Header configuration & styling 1 Feb 24, 2009 07:24 AM


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


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