I have a ‘Continue Reading’ function that looks like this:
function twentyten_continue_reading_link() {
global $id;
return ' <span class="readmore"><a href="'. get_permalink($id) . '">' . __( 'Read More <span class="meta-nav">»</span>', 'twentyten' ) . '</a></span>';
}
I want to add a title attribute, which I think should look something like this
title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"
but I’m not sure exactly how to insert the title in the above function to get it to work correctly. Can somebody help me get the syntax right?
http://codex.wordpress.org/Function_Reference/the_title_attribute#Example
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>"><?php the_title(); ?></a>Since you want to return it, you probably need something like this: