Support » Themes and Templates » Converting Blogger Template to WordPress Template

  • Resolved vietknight


    I’ve been trying for the past few days to convert this blogger template to WordPress and finally completed most of it except for 1 little problem I ran into. I’ve tried everything I could think of to fix it, looking at my css, but have been unlucky to solve the problem.

    My side bar (the calendar part etc..) seems to be moved all the way to the bottom below my posts, even tho the CSS specifies it to be beside the post.

    This error only happens when I have implemented the following code to show my posts:

    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class="date"><?php the_date(); ?></div>
    <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(__('(more...)')); ?>
    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    Specifically the <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>`
    and corresponding code:

    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>

    are the ones that somehow seem to be blocking out my CSS.

    Any help or hints are greatly appreciated.
    Thanks in advance WP personnel.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yep, that’s a pretty common issue with CSS-based sites — but the problem is in the CSS rather than your PHP code.

    Essentially (and you can see this visually), your sidebar is too wide to fit into the space to the right of the content, so it drops to the next available space into which it will fit, which is under the content. You’ll have to make one or the other (or both) less wide.

    Another tricky issue may be *how* you’re specifying the CSS for the content and/or sidebar container. If you use left or right margins, IE may very well double whatever you’ve specified. Just something to know.

    I’ve tried to test out several options but ran into this interesting test.

    If you click on the calendar, for example, like #8 #11 or #13 it will redirect you to the post of that day. And AMAZINGLY the side bar manages to align itsself perfectly on each of those days meaning since I only have like 4 posts showing up at once…and those posts aren’t squeezing any space out of my side bar…I am wondering why it doesn’t show up when all 3 posts (for e.g. if you click home) it makes the side bar align at the bottom.

    I figured it out…simply just making the side bar’s css display as absolute and definining where it is shown.

    Thanks for all your suggestions ;).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Converting Blogger Template to WordPress Template’ is closed to new replies.