Okay guys, I am using this code to display the most recent title on my external page:
<?php
require_once('wp-blog-header.php');
$count_posts = wp_count_posts();
$published_posts = $count_posts->publish;
?>
<?php query_posts('showposts=1'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
It works a treat! My new problem is that I need to cut down the title so it will fit into the small area I need it to. I did a bit of research and somebody told me to add this code:
echo strlen($text > 125) ? substr($text, 0, 125) . '...' : $text;
I haven’t a clue where to add it. Can anyone help?
Thanks guys.