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 »

Content into Header Bar %bar1


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

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Jan 24, 2009, 03:21 AM
Steve_T
 
59 posts · Jan 2009
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,761 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,332 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,761 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,332 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,761 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 Mar 18, 2009, 11:21 AM
paulae's Avatar
paulae
 
1,332 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Oh, Flynn, you assume I know more PHP than I do! Could you give me the full code for this? I tried it and my page disappeared. I think I had ' or ; in the wrong places, but I can't seem to figure it out.

I had this:
Code:
// END of title/description
$logo_area .='
    <td rowspan="2" valign="middle" class="header-banner">
        <img src="http://www.larchmontgazette.com/wp27/wp-content/uploads/2009/03/hypatialight.jpg" align=left>
    </td>
    <td rowspan="2" valign="middle" class="header-banner">
    <script language=javascript src="http://www.larchmontgazette.com/cgi-bin/csBanner2/csBanner.cgi?g=1&js=Y"></script>
    </td>    
    <td rowspan="2" valign="middle" class="header-banner">
    <img src="http://www.larchmontgazette.com/wp27/wp-content/uploads/2009/03/wintergazebo.jpg" width=221 height=80>
    </td>
;
	if ( is_page('858') ) {

<td rowspan="2" valign="middle" class="header-banner">
        <img src="http://www.larchmontgazette.com/wp27/wp-content/uploads/2009/03/hypatialight.jpg" align=left>
    </td>
    <td rowspan="2" valign="middle" class="header-banner">
    <script language=javascript src="http://www.larchmontgazette.com/cgi-bin/csBanner2/csBanner.cgi?g=28&js=Y"></script>
    <td rowspan="2" valign="middle" class="header-banner">
    <img src="http://www.larchmontgazette.com/wp27/wp-content/uploads/2009/03/wintergazebo.jpg" width=221 height=80>
    </td>;
} elseif ( is_category('63') ) {
<td rowspan="2" valign="middle" class="header-banner">
        <img src="http://www.larchmontgazette.com/wp27/wp-content/uploads/2009/03/hypatialight.jpg" align=left>
    </td>
    <td rowspan="2" valign="middle" class="header-banner">
    <script language=javascript src="http://www.larchmontgazette.com/cgi-bin/csBanner2/csBanner.cgi?g=228&js=Y"></script>
    <td rowspan="2" valign="middle" class="header-banner">
    <img src="http://www.larchmontgazette.com/wp27/wp-content/uploads/2009/03/wintergazebo.jpg" width=221 height=80>
    </td>';
The first part, before the first "if" is working fine.
  #8  
Old Mar 18, 2009, 01:26 PM
Flynn's Avatar
Flynn
 
3,761 posts · Oct 2008
Munich, Germany
You'd need to add some PHP code to either display something or do something with the page specific HTML code. In bfa_header_config.php all HTML code is being collected inside of variables (which represent various area of the header, i.e. $logo_area):

PHP Code:
if ( is_page('858') ) {

      
$logo_area .= ' .... HTML code for page #858 here ... ';

} elseif ( 
is_category('12') ) { 

      
$logo_area .= ' .... HTML code for category #12 here ... ';

} elseif ( 
is_category('63') ) {

      
$logo_area .= ' .... HTML code for category # 63 here ... ';

} else {

      
$logo_area .= ' .... default HTML code here ... ';


The dot in $logo_area .= means "add the following to the variable $logo_area" (which holds all HTML for the logo area)

The last else { ... } in the code above will be used if none of the conditions above match. So you'd put the default HTML code there.
  #9  
Old Mar 24, 2009, 03:08 PM
Dagny
 
2 posts · Mar 2009
Hello!
I am brand new to WP and rather self-taught/functionally illiterate in web coding! But thanks to this thread I was able to put iframe code for a digital clock in the right side of the logo area/header space! Now I am trying to get the clock to align vertically to the right of my logo.

Here is my page:
http://www.grainanalyst.com/live-grain-commentary/

And here is the snippet of code I came up with for the bfa_header_config.php:

$logo_area .= get_bloginfo('template_directory') . '/images/' . $bfa_ata_logo . '" alt="' . get_bloginfo('name');
}
$logo_area .= '" /><iframe src="http://free.timeanddate.com/clock/i1gxxi9j/n64/fn2/fs24/ahr/tt0/tw1/tm1/td1/th2/tb2" frameborder="0" width="418" height="35" align="right"></iframe>
</a></td>';


This page is in draft status. I am urging my boss to donate for this great template as this will be a commercial site. THANKS!!!
  #10  
Old Mar 25, 2009, 12:35 PM
Dagny
 
2 posts · Mar 2009
Made some adjustments I'm happy with. No worries, thanks!

Dagny in Chicago
  #11  
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
  #12  
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
  #13  
Old Apr 7, 2012, 01:34 PM
lmilesw's Avatar
lmilesw
 
10,082 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.
  #14  
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
  #15  
Old Apr 7, 2012, 09:10 PM
lmilesw's Avatar
lmilesw
 
10,082 posts · Jul 2009
Central New York State USA
Not exactly sure how you want it to look but you can just use CSS to position wherever you like.
__________________
~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.

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 06:10 AM.


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