I\'m trying to display one line of excerpt from posts beneath the images at the bottom of this website: http://www.wha2wear.com/ This is the php function used to get the images
Your problem is that your display is dependent on the data. A blurb starting with <br>
or <p>
will wrap, otherwise not. Wrap them in div
s to make them line up properly:
<div id="imageDiv"><a href="<?php the_permalink(); ?>"><?php getImage('1'); ?></a></div>
<div id="blurbDiv"><a href="<?php the_permalink(); ?>"><?php echo limit_words(get_the_excerpt(), '6');
echo '...</a>';
echo '</li>'; ?></a></div>
You could also just force a line break between the two:
<a href="<?php the_permalink(); ?>"><?php getImage('1'); ?></a>
<br />
<a href="<?php the_permalink(); ?>"><?php echo limit_words(get_the_excerpt(), '6');
echo '...</a>';
echo '</li>'; ?></a>