I am using the below code to display my next and previous links in single.php:
<div class="nav-previous"><?php previous_post_link( '%link', '<img height="34" src="' . get_bloginfo("template_directory") . '/images/previous.png" />' ); ?></div> <div class="nav-next"><?php next_post_link( '%link', '<img height="34" src="' . get_bloginfo("template_directory") . '/images/next.png" />' ); ?></div>
Everything is working well except that I am defining some rewrite rules in my websites so I am not using the default links like:
I managed to change the structures of my links for all the website except for the next and previous links, since it requires maybe change of core code!!
How can I customize the urls returned by these two Wordpress functions?
Thanks for your time and consideration.
I am using custom post type(=aya-bi-aya).My permalink structure is set to default. It then displays my permalinks like:
But inside my website, I dont need such urls, but instead I am using urls like:
The additional parameters fulfill my needs, especially in my jquery code. Plus, I am using the mod_rewrite to tranform my links to:
The only remaining thing is to change the links in previous and next, so that they respect this last shape.
Thanks Milo for triggering the real issue.