Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Dumb Mistake: Layout wrong, menu not in banner row (http://forum.bytesforall.com/showthread.php?t=19483)

coolpillows Jan 27, 2013 10:00 PM

[SOLVED] Dumb Mistake: Layout wrong, menu not in banner row
 
I was putzing around with CSS and header.php and did something I couldn't trace back and now I've got my menu floating somewhere down the right-hand side of the page. It appears as if it's not in the banner div, even though it's nested under that in the generated code.
<div id="banner" class="row">
<div id="logo-area" class="col8">...</div>
<nav id="menu1-wrapper" class="menu-wrapper col4">...</nav>
Obviously, I'm giving 8 cols to the logo and 4 to the menu; I've tried 7 and 5 and so on, but still not getting anywhere. But it always adds up to 12 I know that.

In header.php, I thought I had restored everything back to the way it was meant to be. If I try to wrap the nav array in div tags then it disappears entirely...just not sure what I did that rendered this f'd up.

BTW, after this boneheaded mistake, I am installing MAMP and setting up a proper dev environment. Somebody could get hurt doing this stuff!

Thanks in advance...:confused:

jerryc Jan 27, 2013 10:28 PM

Quote:

Originally Posted by coolpillows (Post 95622)
I was putzing around with CSS and header.php and did something I couldn't trace back and now I've got my menu floating somewhere down the right-hand side of the page. It appears as if it's not in the banner div, even though it's nested under that in the generated code.

HTML Code:

<div id="banner" class="row">
 <div id="logo-area" class="col8">...</div>
 <nav id="menu1-wrapper" class="menu-wrapper col4">...</nav>


The menu has to go inside a col div, something like:

HTML Code:

<div id="banner" class="row">
 <div id="logo-area" class="col8">...</div>
 <div class="col4">
    [menu code]
 </div>
</div>

Quote:

Originally Posted by coolpillows (Post 95622)
BTW, after this boneheaded mistake, I am installing MAMP and setting up a proper dev environment. Somebody could get hurt doing this stuff!

Quote:

Originally Posted by jerryc (Post 95462)
Experiment with a test template and a test page. Make a new template called something like test.


juggledad Jan 28, 2013 03:05 AM

Why aren't you using the wp_nav_menu() function as shown in the default header.php?
remember if you totally mess up a default virtual template, you can press the button to reset it.

You could copy your existing code to a text file, do the reset and then examine the differences.

oh and note you CAN make custom headers and footers

to make a copy of the header (or footer) virtual template do th following
1) go to mto->Sub Templates->+ Add sub template
2) in the 'Template name' field add a name like 'header-custom'. and press the 'ADD Sub Template button.
3) go to mto->Sub Templates->header.php (or footer.php) do a select all and copy
4) go to mto->Sub Templates->header-custom and paste teh code and press 'SAVE Changes'

now where ever you are calling the header (or footer) use the new templage name like
HTML Code:

<?php get_header('header-custom'); ?>

coolpillows Jan 28, 2013 09:17 AM

Thanks JerryC and JDad. I first tried putting the column div around the menu code, but that didn't fix it. Next I just reset header.php and even restored the main template I had assigned it to back to index.php and alas...still at the bottom there.

Jdad I will explain later about the wp_nav_menu function and my rationale. I follow what youi're saying...

thanks all!

coolpillows Jan 28, 2013 10:03 PM

I studied all the changes in my local MAMP I-haven't-messed-with-it WP/Montezuma install vs. The Cat Squad and realized I had this banner-bg background image which I had commented out. When I put it back in, all went back to normal. I think I must've commented out one of the brackets or something stupid. So, I think I solved this one myself...again. But thanks all!


All times are GMT -6. The time now is 04:35 AM.

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