Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Horizontal Bar above the Header? (http://forum.bytesforall.com/showthread.php?t=23294)

thetravelchronicle Oct 6, 2015 12:23 AM

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:


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?

juggledad Oct 6, 2015 06:06 AM

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

thetravelchronicle Oct 6, 2015 04:49 PM

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.

juggledad Oct 6, 2015 05:15 PM


I neglected to mention that I have a plugin which has inserted itself into the header.php file,
you have a plugin that is updating the themes header.php????? Very bad for...unless it told YOU to update header phe.

what is the plugin??

thetravelchronicle Oct 6, 2015 08:43 PM

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:


juggledad Oct 7, 2015 07:16 AM

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.

thetravelchronicle Oct 7, 2015 11:11 AM

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?

juggledad Oct 7, 2015 03:24 PM

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.

thetravelchronicle Oct 7, 2015 06:12 PM

Hmmm....the code you gave being <div> </div>?
Anyway, I'll look for the plugin and see if it all becomes clear.

juggledad Oct 7, 2015 08:03 PM

put in something like
HTML Code:

<div id="mytoparea">&nbsp;</div>
then add some CSS
HTML Code:

div#mytoparea {height:999999999999px;}
and you should get a really BIG area at the top (grin). You can even set the background-color to what you want.

thetravelchronicle Oct 7, 2015 10:26 PM

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?

juggledad Oct 8, 2015 02:58 AM

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.

thetravelchronicle Oct 8, 2015 10:43 AM

I should be able to get to that by tomorrow afternoon. Any hints regarding what I'll be learning from this procedure?

juggledad Oct 8, 2015 01:31 PM

How not to edit theme filed to make your life easier??? How's that?

All times are GMT -6. The time now is 01:05 AM.

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