get_post_type_archive_link 获取文章类型存档的固定链接

Posted in:
Update time:2020-10-27

 函数描述

获取自定义文章类型存档页面的自定义链接。

 Usage

get_post_type_archive_link( $post_type );

parameters

parametersdata typeRequired or notdescriptivedefault value
$post_typestring (computer science)be自定义文章类型名称not have

返回值

(mixed) 所请求的自定义文章类型的存档页URL,如果文章类型不存在或文章类型没有存档页,返回false。

usage example

<a href="/en/</?php echo get_post_type_archive_link( 'movies' ); ?>">电影存档</a>

We offer WordPress Themes and Plugins Custom Development Services

This site has long undertaken WordPress themes, plugins, WooCommerce-based store mall development business. We have 10 years of experience in WordPress development, if you want to Developing Websites with WordPress, please contact WeChat: iwillhappy1314 or email: amos@wpcio.com for inquiries.

发表回复

Your email address will not be published. 必填项已用 * 标注

*