Andrea Posted February 1, 2010 Report Share Posted February 1, 2010 I've watched the University video 3 times now - and while I had no problem following it exactly, I'm trying to design just a little differently than Jon. Mainly, I want to keep my sidebar on all pages. No problems - BUT on the index page. Seems that no matter what I try, things aren't lining up. I cannot seem to get a content div around the relevant section. I did code a little differently than Jon - mainly, using IDs where things are obvious one-time events per page, and different names - his homesplash is my indexPage, his class canvas is my ID wrapper - stuff like that. The wordpress link in my footer takes you to my work-in-progress, and the actual code on the header and page page are here. Of course, by now I probably messed things up even more, trying to fix this. Header Page <?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> <?php wp_head(); ?> <?php bloginfo('name'); ?> <?php bloginfo('description'); ?> <?php wp_list_pages('title_li='); ?> <?php if (is_page('Home')) : ?> <? endif; ?> Page Page <?php get_header(); ?> <?php if (is_page('Home')) : ?> <?php $post = get_post(); echo $post ->post_content; ?> <?php else: ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php the_content('Read More ....'); ?> <?php endwhile; ?> <?php next_posts_link('< Older Entries'); ?> <?php previous_posts_link('Newer Entries >'); ?> <?php else : ?> Not Found … and you still haven't found what you're looking for (sing it, Baby) <?php endif; ?> <?php endif; ?> <?php get_sidebar();?> <?php get_footer(); ?> Quote Link to comment Share on other sites More sharing options...
lm Posted February 1, 2010 Report Share Posted February 1, 2010 did you try to overwrite standard template style.css by creating your own mystyle.css and calling it after style.css in the header? Quote Link to comment Share on other sites More sharing options...
Andrea Posted February 1, 2010 Author Report Share Posted February 1, 2010 The stylesheet (style.css) is made from scratch. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 1, 2010 Report Share Posted February 1, 2010 This is just an educated guess... but based on this section of code: $post = get_post(); echo $post ->post_content; ?> It appears that your template doesn't include a " " section for the home page. Basically, the code for this page says "if this page is the home page, use this specific content (a p tag, plus content from the database), but if it's a non home page, use a slightly different content. I believe that you'd need to add your div within the first if block, like so: [b][/b] $post = get_post(); echo $post ->post_content; ?> [b][/b] Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 1, 2010 Report Share Posted February 1, 2010 I should mention that this section within your header doesn't really do anything: endif; ?> If you look at your source code for the rendered page, I'm pretty sure you'll find an empty " near the top of the home page. This issue is that this code doesn't wrap anything, since the order the template files are displayed is -- header -- page -- footer You could fix this either with the code in my previous post, or editing your header to remove the closing div: And then adding that closing div to the first line of the footer.php file: endif; ?> endif; ?> Quote Link to comment Share on other sites More sharing options...
Andrea Posted February 1, 2010 Author Report Share Posted February 1, 2010 Thanks Ben - I'll look into it tonight. I think the empty indexPage ID is one of the set-up steps - I was trying to get the content stuff INSIDE that id, but haven't figured it out yet. Anyway- I'll keep plugging away. Quote Link to comment Share on other sites More sharing options...
lm Posted February 1, 2010 Report Share Posted February 1, 2010 remarkably, in View Source option, the new version of FF shows unclosed HTML tags in red ( seen myself few days ago). Hope I havent mixed it up with Notepad ++ Quote Link to comment Share on other sites More sharing options...
Andrea Posted February 1, 2010 Author Report Share Posted February 1, 2010 Ben - I got it. You didn't have the right answer, but what you said directly led me to the solution - that closing div etc needed to go to sidebar.php. EDIT --- or putting it to the bottom of page.php just above the sidebar include seems to work, too - and might make more sense. Either way, I think I just got a better grasp on the concept. Thank You!!! lm --- are you saying I have an unclosed div tag somewhere? How embarrassing Quote Link to comment Share on other sites More sharing options...
lm Posted February 2, 2010 Report Share Posted February 2, 2010 it wasnt me :cool: Just thought was nice feature of FF i noticed the other day - as an extra help even before validating to spot HTML glitches. Quote Link to comment Share on other sites More sharing options...
virtual Posted February 2, 2010 Report Share Posted February 2, 2010 Sorry to butt in, but which version of FF shows up the errors in red in View Source???? Quote Link to comment Share on other sites More sharing options...
lm Posted February 4, 2010 Report Share Posted February 4, 2010 I swear I saw it viewing source in FF 3.6 which I've just upgraded to recently and it helped me to find this unclosed tag. I report it again if I come accross another time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.