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.

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!

Thanks

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 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 at 20:36
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.