obtaining page title from wordpress function previous_post_link()

I’m having a bit of trouble getting my previous_post_link and next_post_link‘s to have title attributes.

I’m passing them along like this:

Read More
<div class="previous <?php if(!get_previous_post()){ echo 'inactive'; }?>">
     <?php previous_post_link('%link', true); ?>
</div>              

<div class="next <?php if(!get_next_post()){ echo 'inactive'; }?>">                     
     <?php next_post_link('%link', true); ?>                
</div>

Optimally, I’d love to get this as an output:

<a href="previous/post/page.html" title="That posts title">previous post</a>

Is there a parameter that I’m missing? Or is something like this not achieveable?

edit: for clarification

Related posts

Leave a Reply

2 comments

  1. in wordpress
    posts_nav_link(), displays both the Previous and Next links,
    or if you want both previous and next post link seperately,

    here is the code,

     <?php previous_post(); ?> 
    

    it displays text “previous post:” as link along with post title.

    without a post title,

     <?php previous_post('%','&laquo; Previous', 'no'); ?> 
    

    To display text, like arrows («), at the beginning of the previous post link and at the end of the next post link so it looks like:

    <?php previous_post('&laquo; &laquo; %', '', 'yes'); ?>
    | <?php next_post('% &raquo; &raquo; ', '', 'yes'); ?>