Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

im working on default wordpress theme twenty eleven, i just wanted to know how can i wrap this previous and next anchor with an image or next/previous button?

<span class="nav-previous"><?php previous_image_link( false, __( '&larr; Previous' , 'twentyeleven' ) ); ?></span>
<span class="nav-next"><?php next_image_link( false, __( 'Next &rarr;' , 'twentyeleven' ) ); ?></span>
share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Try passing in the image into the functions themselves:

<?php 
$previous_image = "<img src='http://domain.com/path/to/image/' alt='Previous Posts'>";
$next_image = "<img src='http://domain.com/path/to/image/' alt='Newer Posts'>";
?>

<span class="nav-previous"><?php previous_image_link( false, $previous_image ); ?></span>
<span class="nav-next"><?php next_image_link( false, $next_image ); ?></span>
share|improve this answer
    
Thanks Brian, Let me try this one. –  XeBii Sep 2 '12 at 4:59
    
Thanks Brian, your suggested answer solved my problem. Really appreciated your help :) –  XeBii Sep 2 '12 at 5:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.