1

How can I hide or disable this « sign in front of previous_post_link? I can't find it anywhere - it only shows up on the generated page.

This is the code I am using:

    <?php
        $nextPost = get_next_post();
        $nextthumbnail = get_the_post_thumbnail($nextPost->ID);
        next_post_link('%link',''.$nextthumbnail.'');
        $next_value = get_post_meta( $nextPost->ID, 'subtext', $single = true);

?>

Thank you!

1

Just copy your next_post_link:

 <?php previous_post_link( '%link', '' . $prevthumbnail . '' ); ?>

Per the codex page, the first parameter specifies what will we be shown (thanks Chip!)

  • Hi - I don't get your answer...sorry. I have the issue of course for both directions... – ad2003 Aug 29 '12 at 12:19
  • 3
    The &laquo; is coming from the default first parameter to previous_post_link(). That default value is "$format='&laquo; %link'". See source. To change it, you need to pass a different value for the first parameter. – Chip Bennett Aug 29 '12 at 14:13
  • thank you! Thank you! Just worked! I changed the link-template.php. – ad2003 Sep 6 '12 at 8:10
  • Mark this answer as accepted then. Glad to help! – Joseph Leedy Sep 6 '12 at 16:33
0

You can define whatever you want. You can wrap %link (the actual link to the post) the way you like it most:

<?php next_post_link( '<strong>%link</strong>' ); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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