0

I'm using this code to get a link to the next post in Wordpress

<?php next_post_link('%link', '', TRUE); ?>

And it gives me this result:

<a href="http://www.someaddress.com/post/3/" rel="next"></a>

All I need is a URL like this:

http://www.someaddress.com/post/3/

Please help

4

1 回答 1

2

尝试:

上一篇:

<?php echo get_permalink(get_adjacent_post(false,'',false)); ?>

下一篇:

<?php echo get_permalink(get_adjacent_post(false,'',true)); ?>
于 2013-08-01T03:19:53.293 回答