<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_excerpt(); ?></a>… doh
for the first part anyway, any ideas on the title truncation?
You could use a little php function called substr()
<?php echo substr(the_title('','',FALSE), 0, 30); ?>
change the 30 to however many characters you’d like.
you might want to make this super-pretty by doing something like this:
<?php
$cutoff = 30;
$title = the_title('','',FALSE);
if (strlen($title)>$cutoff) echo substr($title, 0, 30).'...';
else echo $title;
?>
that’ll put a ‘…’ at the end of your titles, but only if something’s been cut off.
you could also replace the dots above with the HTML entity ‘…’
YOU ROCK!!! Thanks 🙂 Worked like a charm.
I was using Joomla for a while and am so happy to be returning to WordPress… Joomla is ok for what it is, but it’s in no way a writing platform!
🙂
I missed a spot in the addon I posted above… too late to edit.
it won’t break anything, but this is what I intended to post:
<?php
$cutoff = 30;
$title = the_title('','',FALSE);
if (strlen($title)>$cutoff) echo substr($title, 0, $cutoff).'...';
else echo $title;
?>
Glad it works for you.