Support » Fixing WordPress » Blog Header Bars Out Of Alignment!

  • Resolved alexlisic

    (@alexlisic)



    My blog is having a strange issue. Before each blog post is a header bar displaying the post date, author, and categories. The first post on every page looks great. After that however, the author and categories get out of alignment on each subsequent post and end up above the header bar. I have tried everything to fix this, but have absolutely no clue. Its not a problem with the template, as I am using it on another site with no such issue. I must have done something but I cant figure out what!

Viewing 5 replies - 1 through 5 (of 5 total)
  • For some reason, the author info of those posts is not wrapped in the postauthor span.

    How do I fix this?

    Below is the code for my blog.php file.

    <div class="ribbon">
    								<div class="wrapAround"></div>
    								<div class="tab">
    									<span class="blogDate">
    									<?php
    									if (get_theme_var('postsShowDate') !== '' ) {
    										echo  get_the_time('M') .' '. get_the_time('j') ;
    									} 
    
    									?>
    									</span>
    									<span class="blogPostInfo">
    										<?php
    										// post date
    										if (get_theme_var('postsShowAuthor') !== '' ) { ?>
    											<span class="postAuthor"><?php _e('Posted by ',THEMENAME );  the_author_posts_link(); _e(' in ',THEMENAME ); the_category(', '); ?></span>
    											<?php echo '|&nbsp;'; comments_popup_link('Comments', '1 comment', '% comments'); ?>
    											<?php
    										}
    										?>
    								   </span>
    								</div>
    							</div>
    
    							<div class="blogPostSummary">
    								<h1 onclick="document.location.href='<?php echo get_permalink(); ?>'" style="cursor:pointer;"><?php the_title(); ?></h1>
    								<?php
    								if ( $postImg['showImage'] ) { ?>
    									<div class="blogPostImage">
    										<a href="<?php echo get_permalink(); ?>" class="img"><?php echo $postImg['full']; ?></a>
    									</div>
    								<?php } ?>
    
    								<p><?php the_content(); ?></p>
    								<p><a href="<?php echo get_permalink(); ?>"></p>
    							</div>
    							<?php
    						endwhile;
    					?>

    It might be a hyperlink that is not closed:

    <p><a href="<?php echo get_permalink(); ?>"></p>

    compare get_permalink

    Looks like that might have been it! I fixed it! Thanks Triple P!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Blog Header Bars Out Of Alignment!’ is closed to new replies.