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 »

Content into Header Bar %bar1


  #1  
Old Jan 24, 2009, 03:21 AM
Steve_T
 
59 posts · Jan 2009
Content into Header Bar %bar1

Great Theme ! - donation sent

How do I place content into the %bar1 thing

I'd particularly like to place the Blog Tagline in there. Or I could just hide the Blog Tagline and place some text into %bar1 but I don't know how to put it there. I'm quite happy hacking into the index.php if that's what it takes
  #2  
Old Jan 24, 2009, 04:31 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Thank you for the donation.

You would have to edit functions/bfa_header_config.php, line 181 or line 187

PHP Code:
$horizontal_bar1 '<div class="horbar1">&nbsp;</div>'
Replace

HTML Code:
&nbsp;
with your (HTML) content.

To put PHP code into a horizontal bar, use

PHP Code:
$horizontal_bar1 '<div class="horbar1">' PHP_CODE_HERE '</div>'
The PHP code should not print output. (i.e. with "echo ...")

Finally add %bar1 or %bar2 at Theme Options -> Header -> Configure Header Area
  #3  
Old Mar 15, 2009, 12:35 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I've been able to put a Javascript ad banner inside the bar1 area.
Code:
{// Horizontal bar 1
$horizontal_bar1 = '<div class="horbar1"><center><script language=javascript src="http://www.larchmontgazette.com/cgi-bin/csBanner2/csBanner.cgi?g=1&js=Y"></script></center>
</div>';
// END of Horizontal bar 1
}
However, on a few other pages, I want to have a different banner, because those pages or categories are sponsored by different advertisers. How would I do that? I have special templates for those, but they get the same header info. I wonder if I could use some kind of "if is page(?)" code?

Here is the index page: http://larchmontgazette.com/wp27/. Here is the obituaries page where I need a different banner. You can see where I put it down in the body, but I would rather have it up where the other banner is. http://larchmontgazette.com/wp27/?page_id=858
  #4  
Old Mar 17, 2009, 04:16 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You could use something like this:

PHP Code:
 {// Horizontal bar 1
$horizontal_bar1 '<div class="horbar1"><center>';
if ( 
is_page('XX') ) {
$horizontal_bar1 .= '
<script language="javascript"  src="http://www.larchmontgazette.com/cgi-bin/csBanner2/csBanner.cgi?g=1&js=Y"></script>'
;
} elseif ( 
is_page('XX') ) {
$horizontal_bar1 .= 'OTHER CODE HERE...'
} elseif ( 
is_category('XX') ) {
$horizontal_bar1 .= 'OTHER CODE 2 HERE...'
} else {
$horizontal_bar1 .= 'DEFAULT CODE HERE...'
}
$horizontal_bar1 .= '</center></div>';
// END of Horizontal bar 1

  #5  
Old Mar 17, 2009, 04:24 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Thank you. I finally got it working today, in the logo bar, using code to modify bfa_header_config.php you gave somebody else:

Code:
 // END of title/description
$logo_area .='
    <td rowspan="2" valign="middle" class="header-banner">
    BANNER 1 CODE
    </td>
    <td rowspan="2" valign="middle" class="header-banner">
    BANNER 2 CODE
    </td>    
    <td rowspan="2" valign="middle" class="header-banner">
    BANNER 3 CODE
    </td>
';
http://www.larchmontgazette.com/wp27/

Could I use the "else if" code you mention here in order to make a different banner appear on category pages that are sponsored exclusively by one company?

Last edited by paulae; Mar 17, 2009 at 04:51 PM.
  #6  
Old Mar 18, 2009, 10:39 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Sure, you'd use is_category(), is_category('9'), is_category('category-name') or is_category('Category Name') then
  #7  
Old Nov 27, 2009, 09:14 AM
soarhighest
 
3 posts · Nov 2009
Quote:
Originally Posted by Flynn
Thank you for the donation.

You would have to edit functions/bfa_header_config.php, line 181 or line 187

PHP Code:
$horizontal_bar1 '<div class="horbar1">&nbsp;</div>'
Replace

HTML Code:
&nbsp;
with your (HTML) content.

To put PHP code into a horizontal bar, use

PHP Code:
$horizontal_bar1 '<div class="horbar1">' PHP_CODE_HERE '</div>'
The PHP code should not print output. (i.e. with "echo ...")

Finally add %bar1 or %bar2 at Theme Options -> Header -> Configure Header Area
Hi Flynn,

I love this theme and I have been learning very quickly how to do things from the excellent support you have on here.

I have run into a few problem however and would be happy to donote if these can be resolved.

1. I have added this code ob_start(); wp_loginout(); $loginlink = ob_get_contents(); ob_end_clean();
$page_menu_bar .= '<li>' . $loginlink . '</li>' . "\n";


...so my login is in my Page Menu Bar but I would love it to go in the Horizontal Menu Bar above it where I already have some HTML links inserted. I would also like a register link their too. Can this be done?

2. I would love to leave the Page Menu Bar background white but have the tabs static and hover colours different like blue? I cannot see where this can be modified.

3. Is it possible to put rounded or curved tabs on the page manu bar?

I have provided an image HERE with 1, 2 & 3 referenced in it for convenience and would appreciate any help you can offer?

Many thanks in advance.

SoarH
  #8  
Old Apr 7, 2012, 01:22 PM
Hody's Avatar
Hody
 
156 posts · Apr 2012
Can I do this a similar way in order to display the tagline in bar1 one instead of besides the logo?
__________________
...that I rock, doesn´t mean I am made of stone!
My Blog: Diary of a Fatman - Run Fatboy Run! - Tribe Online Magazine - Freiburg
  #9  
Old Apr 7, 2012, 01:34 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
In place of bar one just use a div with the text you want in it. Below would give you the text in an area with a red background. Just use this in place of %bar1.
HTML Code:
<div style="background:red;"> This is the tagline</div>
__________________
~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.
  #10  
Old Apr 7, 2012, 02:07 PM
Hody's Avatar
Hody
 
156 posts · Apr 2012
Used
HTML Code:
<div style="background:#003471;font-size: 15px;font-weight: normal;line-height: 18px; color: #B5C0CD;"> <font face="Verdana, Arial, Helvetica, sans-serif">Multimedia,
  Musik & mehr für Freiburg und das Dreiländereck</font></div>
which works - but I need to align the text more away from the left border, so that it matches the menu items.

Take a look newlayout.tribe-online.de thanks!
__________________
...that I rock, doesn´t mean I am made of stone!
My Blog: Diary of a Fatman - Run Fatboy Run! - Tribe Online Magazine - Freiburg

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash content in header image iain Header configuration & styling 5 May 18, 2011 07:27 AM
Content appearing over header JeffreyG61 Web Hosting for WordPress 1 Jun 24, 2009 08:32 AM
How do you make a right side bar on "Page" pages present different content nasu Sidebars & Widgets 4 May 25, 2009 07:11 PM
Minimum size for bar1 / bar2 in windows? mcphoto Header configuration & styling 2 May 11, 2009 03:36 PM
Can I make room for more content in the header area DoverTim Header configuration & styling 2 Apr 5, 2009 12:55 PM


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


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