![]() |
Horizontal Bar above the Header?
I'd like to add some space at the very top of the page.
So, I made my way to: header.php and found the following code: <?php wp_head(); ?> and pasted together a line of made up code without any real idea what I was doing: <?php header_items( $horizontal_bar1 = ' '); ?> I can't be too far off, it seems, because it turns my home page into one big blank horizontal bar - in the appropriate color. Could anyone suggest a way to have a regular height %bar1 above the Header area? |
Why not add %bar1 as the first item in the 'Configure header area' option and then style it the way you like? Then it is part of the theme options.
in the bar1 options use 'height 150px; background-color: red;' and you will have 150px red banner at the top |
Oops. I neglected to mention that I have a plugin which has inserted itself into the header.php file, which is why I was mucking around in there to begin with.
My two choices for user selected placement of the plugin are: [horizontal-scrolling group="GROUP1"] <?php newannouncement( $group = "GROUP1" ); ?> Neither of which can be dropped "naked" into the configure header space - or so my very quick test would indicate. So, I either need to learn how to insert php into the configure header space so that I can then add a bar above the plugin, or I need to get a bfa horizontal bar into header.php I think. |
Quote:
what is the plugin?? |
Well, I don't remember how the bit of code that calls for a Horizontal Scrolling announcement got into the header.php file, but that doesn't mean I didn't do it. This is one of about a dozen completely unrelated projects...oh nevermind.
Here is the site, I can learn to live with the scroll smack up against the top, but thought this might be a good-for-general-knowledge type endeavor: https://ctsaspen.com |
go to ATO->Add HTML/CSS Inserts->HTML Inserts: Body Top add a <div...>...</div> and add CSS to style it the way you want.
|
Nope. Anything I add there goes in under the scroll, not above.
I went back to header.php, and added: <div id="%bar1" class="horbar1"></div> above the scroll. This works. However, given your aversion to messing with header.php, am I creating other problems that haven't reveled themselves yet? |
the reason I suggest you don't edit header.php is that the next time you update the theme your changes will be gone.
If you had the plugin 'exec-php', you could put the code I gave, followed by a dynamic widget area in the .HTML Inserts: Body Top'. Then you could add the code you put in the header.php into a text widget in your new widget area. Now you haven't touched the theme code. |
Hmmm....the code you gave being <div> </div>?
Anyway, I'll look for the plugin and see if it all becomes clear. |
put in something like
HTML Code:
<div id="mytoparea"> </div> HTML Code:
div#mytoparea {height:999999999999px;} |
Yep, I could tinker with that and end up with a bar above the scroll, but only if I can figure out how to move the scroll out of header.php
Having committed about an hour, I don't think learning how to place a text widget inside a dynamic widget is within my time budget - which is already used up. I'll leave instructions to my heirs about pasting code into header.php every time there is a theme update. Maybe someday there will be a way to use shortcode in HTML insert fields? |
Download a fresh copy of the theme and unzip it on your pc and download the existing header.php then do a file compare to see the differences. On my Mac I use textwrangler for the compare.
|
I should be able to get to that by tomorrow afternoon. Any hints regarding what I'll be learning from this procedure?
|
How not to edit theme filed to make your life easier??? How's that?
|
All times are GMT -6. The time now is 01:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.