WordPress.org

Support

Support » Themes and Templates » Part of sidebar missing?!

Part of sidebar missing?!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Could it have to do with this?
    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>

    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

    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

    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

    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 🙂

    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

    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?

    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.

    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

    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.

    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

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Part of sidebar missing?!’ is closed to new replies.
Skip to toolbar