Title: Custom Post Type Archive Permalink
Last modified: August 21, 2022

---

# Custom Post Type Archive Permalink

 *  Resolved [Mohammad Ridwanullah](https://wordpress.org/support/users/readonecc/)
 * (@readonecc)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/custom-post-type-archive-permalink/)
 * Hi, how to call custom post type archive permalink? I am now using custom breadcrumb,
   I can call custom post type name but not permalink. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [3 years, 9 months ago](https://wordpress.org/support/topic/custom-post-type-archive-permalink/#post-15936806)
 * [https://developer.wordpress.org/reference/functions/get_post_type_archive_link/](https://developer.wordpress.org/reference/functions/get_post_type_archive_link/)
   should do the trick, and as the comments on there note, if it still returns “
   false” or doesn’t work in some way, make sure that you’ve set “has archive” to
   true.
 *  Thread Starter [Mohammad Ridwanullah](https://wordpress.org/support/users/readonecc/)
 * (@readonecc)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/custom-post-type-archive-permalink/#post-15956030)
 * Thank you, but I would like to call the link on breadcrumb, it’s mean that the
   link should be dynamic to each post type so I can not use a string.
    Can you 
   help me please figure out this problem? Here is my code:
 *     ```
       function my_breadcrumb() {
       	$postType = get_post_type_object(get_post_type());
       	echo '<a href="'.home_url().'" rel="nofollow">Home</a>';
       	if ((get_post_type() || is_single()) && !is_search()) {
               echo "  »  ";
       		echo '<span style="text-transform: capitalize;">';
               echo esc_html($postType->labels->singular_name); 
       		echo '</span>';
                   if (is_single()) {
                       echo "   »   ";
                       the_title();
                   }
           }
       };
       ```
   
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [3 years, 9 months ago](https://wordpress.org/support/topic/custom-post-type-archive-permalink/#post-15956177)
 * You’ll likely want to make use of [https://developer.wordpress.org/reference/functions/get_queried_object_id/](https://developer.wordpress.org/reference/functions/get_queried_object_id/)
   to get the currently queried object.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom Post Type Archive Permalink’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/custom-post-type-archive-permalink/#post-15956177)
 * Status: resolved