WordPress.org

Ready to get started?Download WordPress

Forums

Part of sidebar missing?! (12 posts)

  1. WorldBuilder
    Member
    Posted 8 years ago #

    Hi all,

    I am almost done integrating WP into my site layout, and props to "Moshu" here for helping out. Test blog is at http://www.bartlett-family.net/chrisbartlett/blog2/

    Once I got the index page worked out, I started migrating to secondary pages. Working with "single.php" now, in the themes/default directory...

    Notice that there are several sidebar items: Archives, Categories, Fellow Bloggers, and Meta. That's exactly how I want it. I have no blogroll. I manually added the fellow bloggers to the sidebar.php file.

    Now, for fun, go to http://www.bartlett-family.net/chrisbartlett/blog2/?p=1 (which is the page called from the single.php file). Works great, BUT Fellow Bloggers and Meta are gone! HUH?!

    Can someone help me figure out why? Below, please find links to TEXT file versions of the index, header, sidebar, and single php files I have made, as well as my CSS file, in case you need to se that, too.

    http://www.bartlett-family.net/chrisbartlett/blog2/index.txt
    http://www.bartlett-family.net/chrisbartlett/blog2/sidebar.txt
    http://www.bartlett-family.net/chrisbartlett/blog2/single.txt
    http://www.bartlett-family.net/chrisbartlett/blog2/header.txt
    http://www.bartlett-family.net/chrisbartlett/main.css

    I would very much like some help, and would be most appreciative!

    Thank you!

    Chris

  2. oriecat
    Member
    Posted 8 years ago #

    Could it have to do with this?
    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>

  3. WorldBuilder
    Member
    Posted 8 years ago #

    That seems to be it. I moved it. Thanks! Now, it's fixed, but I have a bigger problem. The index page is FINE, but the single pages no longer validate as XHTML 1.0 Strict, which is very important to me. I've played with this for 2 hours now and cannot get it to validate and display properly.

    I've updated the txt files above with the most recent changes, and will not touch them until advised so as not to confuse things.

    I'd appreciate your thoughts on this matter.

    In addition, there are a few more things that I can't figure out... They're not immediately critical, but if you happen to know this, too, that'd be great.

    In FF, the blog search is directly aligned horizontally from the regular search. Not in IE, it's lower. No matter what I do with padding and margins, I can't seem to align it in IE like it is in FF.

    In IE, the arrows in the lists aren't there like they are in FF.

    In both IE & FF, all the links under "Navigation" are pushed about 10px or so further to the right than they are on all other pages. Have a look at their location on anyother page (EXCEPT HOME), and you'll see the difference.

    Thoughts?

    THANKS!

    Chris

  4. Lorelle
    Member
    Posted 8 years ago #

    We tend to answer one question per post here.

    I ran your single post page through the validation and the errors are very simple and well explained. You are missing a closing LI tag. This is for your lists in the sidebar. Just follow them and make sure that every time you open one, it closes. This will help with the nested lists in many WordPress Themes:

    http://codex.wordpress.org/Styling_Lists_with_CSS

    If you are using a theme based upon the Default Theme, which uses a hack to create the double arrows, they will look different in MSIE vs FF. It says so in the CSS.

    Alignment problems are also very common between the different browsers as they interpret different ways of measuring the space for padding and margins. You can learn to live with it or check out the many hacks to force different browsers to "shape up".

    See: articles on CSS Troubleshooting

  5. WorldBuilder
    Member
    Posted 8 years ago #

    You said, "I ran your single post page through the validation and the errors are very simple and well explained. You are missing a closing LI tag. This is for your lists in the sidebar. Just follow them and make sure that every time you open one, it closes. "

    I would assume that if you look around my site, you'll notice that when it comes to XHTML & CSS I'm pretty darn AWESOME! Not to float my own boat or anything because I do admit that I don't know everything, but I'm pretty good at it. If it's so "simple", please tell me how to fix it specifically because I've attacked it with all my worldly knowledge to no avail.

    The alignment problem I'm not really worried about.

    I'd appreciate it!

    Chris

  6. moshu
    Member
    Posted 8 years ago #

    You don't need any specific knowledge, just ask the validation page to "Show structure" and it will show you exactly where the missing li and ul should be.
    BTW, before this:
    </div> <div id="contentright">
    it should be:
    </li>
    </ul>
    </div> <div id="contentright">

    ...and I am not awesome, just a learner :)

  7. WorldBuilder
    Member
    Posted 8 years ago #

    Hmmmmm...

    Ok. Sorry if I seemed a little snotty earlier. I've had two hours of sleep, and am better now. Was tired.

    But, ok. I'm well aware of how to read the validator, and I know exactly what it wants. Just as you obviously do.

    But there's one problem. You are looking at the XHTML outputted code, NOT the php code. I can't add directly to the XHTML code, and you know it. So, the question is this: Where and in which php file do I add this to output it to that location in the XHTML?

    As I said, I worked on this for 2 hours before to no avail. I've tried everything I know!

    Thanks, guys! :)

    Chris

  8. WorldBuilder
    Member
    Posted 8 years ago #

    Update:

    Ok, well I found and sorta fixed it finally. I added the closing li and ul tags right above the closing DIV in the sidebar.php file. NOW, the single pages DO validate, but the main blog index page doesn't, and I can understand why. It doesn't like those to list closers.

    Would anyone know what to do in order to get validation to all pages? There has to be a way... I've updated the text file links again.

    Thanks, all!

    Chris

    PS. How do I post actual code inside a post in this forum?

  9. moshu
    Member
    Posted 8 years ago #

    1. About posting code: see the instructions below the text area - use "backticks" around it; it's usually next to "1" on the keyboard :)

    2. Your problem is the following: you have an if statement with an additional closing li and ul which appears ONLY on home (=index) and Pages (which you don't have yet)...
    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    <?php get_links_list(); ?>
    <?php wp_meta(); ?>
    </ul>
    </li>
    <?php } ?>

    Delete it - since seemingly you are not using it, or move the end if the if BEFORE the closing ul, li - and in that case you can delete what I suggested to pout in earlier.

  10. WorldBuilder
    Member
    Posted 8 years ago #

    Well I'll be a monkey's uncle. THAT DID IT! Ok, here's a question for you. In the past, I actually had deleted <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>, but every time I did, I got a parse error. Now, that was the only line I would delete, not the whole thing you said above.

    Could you elaborate, please? It obviously has to do with php, which I know little about...

    What does that code do?

    Thanks a million, Moshu!

    Chris

  11. moshu
    Member
    Posted 8 years ago #

    I am afraid you are asking the wrong person, since I am a PHP moron, but here is my (educated :) guess:
    at the end of the if_statement you have an opening "{" which is closed in the last line of the code
    <?php } ?>
    If you don't delete this latter one ==> parse error because it is closing something that wasn't open.
    Well, maybe some PHP guru can explain it better.

  12. WorldBuilder
    Member
    Posted 8 years ago #

    php moron, eh? That's ok, I think I'm just a little dumber than you with that one! At least you had an educated guess. I just hope it doesn't screw anything up as I finish this, but if it does, I'm sure a php guru will know.

    Thanks for all your help!

    Chris

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.