whoisandy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: New pages not referencing header.php correctly?Hi David,
Yes, I just added those php conditionals like the first 3 links have and adjusted them for the last 3 (work, photos, contact). Now the menu is consistent throughout. This theme is just a pain to work with as it wasn’t built to be easily customized. I’m working through it, though. Thank you guys for the help.– Andy W.
Forum: Fixing WordPress
In reply to: New pages not referencing header.php correctly?It’s the way the template was and seems to be the only way it works I’m afraid. It’s the only theme I liked but I don’t think it’s built conventionally.
The way the menu is, it’s done manually this way, I believe. In the wordpress admin, under appearance/menus, there are no menus there and it says “The current theme does not natively support menus, but you can use the ‘Custom Menu’ widget to add any menus you create here to the theme’s sidebar.”
I think this is why I have to have all the php conditionals. Do you think I can just add conditionals to the remaining 3 and it should work?
UPDATE: added conditionals to the remaining 3 pages manually and it seems to be working now.
Forum: Fixing WordPress
In reply to: New pages not referencing header.php correctly?Well, I’ve spent all weekend trying to figure this stuff out and still haven’t got it. I have searched and experimented so much with this, my head is 2 seconds away from exploding. I just have ONE more question:
The main menu is displayed correctly on the main page but clicking on the links (try ‘contact’ for example), the menu (header.php) changes. It’s missing the right side. This is what the code currently looks like. I can’t figure out what I have to do to keep the menu the same throughout the main page and all other pages. What is wrong with it? Is there something else I’m missing?
<?php wp_head(); ?> </head> <body> <div id="menu"> <h1><a href="<?php bloginfo('url'); ?>"><b>WHO</b>IS<b>ANDY</b></a></h1> <div></div> <ul> <li <?php if ( is_home() ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/">NEWS</a> <ul> <li <?php if ( is_page(work) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/work">WORK</a></li> <li <?php if ( is_page(photos) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/photos">PHOTOS</a></li> <li <?php if ( is_page(contact) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/contact">CONTACT</a></li> </ul> </li> <li <?php if ( is_page(resume) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/resume">RESUMé</a> <ul> <li <?php if ( is_page(work) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/work">WORK</a></li> <li <?php if ( is_page(photos) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/photos">PHOTOS</a></li> <li <?php if ( is_page(contact) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/contact">CONTACT</a></li> </ul> </li> <li <?php if ( is_page(reel) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/reel">DEMO REEL</a> <ul> <li <?php if ( is_page(work) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/work">WORK</a></li> <li <?php if ( is_page(photos) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/photos">PHOTOS</a></li> <li <?php if ( is_page(contact) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/contact">CONTACT</a></li> </ul> </li> </ul> </div>
Forum: Fixing WordPress
In reply to: New pages not referencing header.php correctly?UPDATE: I jumped the gun and posted a quick fix I had done but it turned out to be a fluke. Still trying to get the above figured out…
Forum: Fixing WordPress
In reply to: New pages not referencing header.php correctly?Thanks for the help, David. Using the validator, I repaired all code and it now passes the validation. I was able to get a step forward with my menu issue but also took a step back..
After cleaning up the code, the menu is now coming through on all new pages – finally! This is good news but I broke the 2 column menu setup I had before. It’s now just one. It looks like in the template, he used an if/else statement to break the menu up. In repairing my header code, I took these out because it was giving me the first error I mentioned and I am unsure how to re-build it properly.
This is the code that was working on the index page but wasn’t coming through on any new pages. Is there a way I can re-write this? I want to always have the 2nd column that lists work, photos, and contact.
<div id="menu"> <h1><a href="<?php bloginfo('url'); ?>"><b>WHO</b>IS<b>ANDY</b></a></h1> <div></div> <ul> <li <?php if ( is_home() ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="<?php bloginfo('url'); ?>/">NEWS</a> <?php if ( is_home() ) { ?> <ul> <li <?php if ( is_page(work) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/work">WORK</a></li> <li <?php if ( is_page(photos) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/photos">PHOTOS</a></li> <li <?php if ( is_page(contact) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/contact">CONTACT</a></li> </ul> </li><?php } else { ?></li><?php } ?> <li <?php if ( is_page(resume) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/resume">RESUMé</a> <?php if ( is_page(about) ) { ?> </li><?php } else { ?></li><?php } ?> <li <?php if ( is_page(reel) ) { ?>class="cur"<?php } else { ?><?php } ?>><a href="/reel">DEMO REEL</a> <?php if ( is_page(about) ) { ?> </li><?php } else { ?></li><?php } ?> </li> </ul> </div>
I am far from a pro but it looks like the way he wrote this is to only show the 3 extra links IF on the home page (news). ELSE, just show resume and reel. I can’t figure out a way to remove the if/else and keep the 2 columns of all links at all times. Perhaps I am missing something. If anyone could point me in the right direction, would be greatly appreciated. Thank you.