Text in Homepage Single Column widget not filling entire width
  • I'm using the Homepage Single Column widget on my web site (http://www.drsusansim.org) to showcase my latest post. But the text in the blog post is not filling the entire width of the available space. It's scrunched up to the left. Any thoughts on what I'm going wrong? Or maybe not wrong, but how I can fix this?
  • mikemike
    August 2012
    It looks like you have made some customizations that are getting in the way OR are using a different widget. Here is an example of the single column working on our test server:
    http://themichaelgarcia.com/galaxy/

    See how the title and content stay on the right side of the image*. Your title is on top.
  • On the example that you showed me, you're talking about the second set of Latest Posts, right? I see what you mean. My page doesn't look like that. However, I paid close attention to when the page loaded and at first it looks like the layout is going to be full width, as in the example, and the column becomes narrower at the last moment, just before the image appears.

    So things that I have tried/checked...

    I double checked and it's definitely the Homepage Single Column widget. Here is a screen shot: http://www.drsusansim.org/img/ScreenShot.png

    What kinds of customizations were you thinking of? Here are some things that I have tried.

    I restored the defaults in the theme options and there is no change.

    I turned off the plugins and there is no change.

    I made one change to the CSS to make the normal text black.

    I have tried removing the tag and it makes no difference. (It's back now.)

    I have removed the image and it also makes no difference. BTW, what should it look like if there is no photo?

    Is there any markup or short codes that I should be using to get this to go full width? Does the photo need to be the "featured photo" on a page?
  • mikemike
    August 2012
    Ahh I see, Yeah the photo needs to be a featured image. That will sort out the problem :-)
  • I don't know about you, but having the layout in your widget go wonky when there isn't a featured photo this sounds like a bug to me. The text should fill the space if there isn't one.

    I generally don't like using a feature photo, because it tends to take up too much space before the start of the blog post. In other words, I can't make the text flow around it. Usually, I just insert the photo into the post, because I have more control over the appearance.
  • mikemike
    August 2012
    You can adjust this if you don't want to use a featured image. Just edit the widget in the /widget folder and remove the column containing div :-). That is what is containing your content.
  • Thanks for the suggestion, but I'm not editing the theme without more specific instructions than that. :)

    I assume that you mean widgets/homepage_1col_widget.php . Do you mean the section with grid3column or grid2column? Can I just comment out the div that I don't want?

  • mikemike
    August 2012
    Yeah, just save a backup. Then edit the 1 column widget.

    Delete this:

    <div class="grid3column">
    <?php if(has_post_thumbnail()): ?>
    <a href="<?php the_permalink(); ?>" class="photo-hover"><?php the_post_thumbnail('portfolio-thumb'); ?></a>
    <?php else: ?>

    <?php if(get_post_meta($post->ID, 'pyre_video_embed_link', true)): ?>
    <?php
    $video = get_post_meta($post->ID, 'pyre_video_embed_link', true);
    $pattern = "/height=\"[0-9]*\"/";
    $video = preg_replace($pattern, "height='281'", $video);
    $pattern = "/width=\"[0-9]*\"/";
    $video = preg_replace($pattern, "width='500'", $video);
    ?>
    <div class="video-border">
    <?php echo $video; ?>
    </div>
    <?php endif; ?>
    <?php endif; ?>
    </div>




    Then Delete just this line:
    <div class="grid3columnbig lastcolumn">

    and the closing div:
    after the_content call.
    </div>