How to get link to custom post type archive page? [wordpress]

I have custom posts loop and at the bottom I want to add “View all” link that should lead to the page with all posts of that type.

The only solution I could think of is to have a template page for the post type and hardcode the link to it, but I am hoping for a more elegant and dynamic solution.

Read More

I’ve checked out the Codex and none of the functions seems to cover this.

Thanks

Bojana

Related posts

Leave a Reply

2 comments

  1. In case get_post_type_archive_link() returns false, make sure that you have used the argument has_archive => true when using register_post_type().