Last active
September 18, 2019 10:29
-
-
Save vbaimas/399f57284da982c6b15a9d8c5b80b444 to your computer and use it in GitHub Desktop.
Scenario : If you have a custom posts loop and in the bottom you want to add "View all" link, then how you should lead to the page with all posts that type?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="<?php echo get_post_type_archive_link ( 'your_post_type' ) ?>"</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: In case that
get_post_type_archive_link()
returnsfalse
, make sure that you have used the argumenthas_archive => true
when usingregister_post_type().