WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom post type with meta box. The output is paginated, so that my custom page will output one post at the time which works just fine.

What I need is to be able to create a menu link on the front-end so a user can select from any of the custom post type posts. I was using next and previous links like this:

<?php previous_posts_link('&laquo; Newer') ?>
<?php next_posts_link('Older &raquo;') ?>

The problem with this approach is the user only sees links to the next and previous posts, not all of the custom post type posts. However, this system does use correct links NOT "?cpt=value"

If I use a plugin to automatically generate a menu for the custom post type it uses "?cpt=value" links. I can't use a plugin since I am using a custom page template to output info, so if I use it it gives me wrong links. (http://wordpress.org/plugins/custom-post-type-auto-menu/)

I could not find anything that would help me to figure the way to output correct link.

How do I output correct link for all post types in that category?

This is actual link to custom page with cpt(links I need):
enter image description here

enter image description here

But if I generate automatic link it will give me:
enter image description here

enter image description here

UPDATE: I learned that I can use paginate_links function to get all cpt pages, but it displays numbers of pages not post titles, and I can't find any info if this supports titles..
src: http://codex.wordpress.org/Function_Reference/paginate_links

Any help is much appreciated!


share|improve this question
Just to clarify are you looking to get the adjacent posts or are you looking to get a list of posts within the same category? – MichaelJames Jan 16 '14 at 7:26
I am looking for list of posts within same category. Basicly now i got it working with paginate links, but it shows all my custom posts with numbers, but i need it to display post manes instead of numbers. – JohnLV Jan 16 '14 at 20:36

Your Answer


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

Browse other questions tagged or ask your own question.