Title: Post Link Shortcodes
Author: Evan Mattson
Published: <strong>2013 年 8 月 27 日</strong>
Last modified: 2019 年 10 月 19 日

---

搜索插件

![](https://ps.w.org/post-link-shortcodes/assets/banner-772x250.jpg?rev=1196653)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/post-link-shortcodes/assets/icon-256x256.jpg?rev=1196653)

# Post Link Shortcodes

 作者：[Evan Mattson](https://profiles.wordpress.org/aaemnnosttv/)

[下载](https://downloads.wordpress.org/plugin/post-link-shortcodes.0.4.1.zip)

 * [详情](https://cn.wordpress.org/plugins/post-link-shortcodes/#description)
 * [评价](https://cn.wordpress.org/plugins/post-link-shortcodes/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/post-link-shortcodes/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/post-link-shortcodes/#developers)

 [支持](https://wordpress.org/support/plugin/post-link-shortcodes/)

## 描述

This plugin dynamically adds a collection of helpful shortcodes for each registered
post type. These shortcodes can be used to return URLs, or generate HTML elements
like anchors and images to the related post!

Each post type will have 2 shortcodes created for it where `{type}` is the name 
of the post type. Eg: `post` or `page`

    ```
    [{type}_url]
    [{type}_link]
    ```

If the post type was registered with `has_archive`, two more shortcodes will also
be created:

    ```
    [{type}_archive_url]
    [{type}_archive_link]
    ```

**NEW in 0.4.0:**
 If the post type supports `thumbnail` (featured images) two more
shortcodes will also be created: [{type}_src] [{type}_img]

**NEW in 0.4.0:**
 Attachment shortcodes [attachment_src] [attachment_img]

    ```
    [post_src hello-world]
    [post_img hello-world size=medium]
    ```

**For more information and examples: [Read the Documentation](https://github.com/aaemnnosttv/post-link-shortcodes/wiki)**

### More

[Post Link Shortcodes on GitHub!](https://github.com/aaemnnosttv/Post-Link-Shortcodes)

## 屏幕截图

 * [[
 * Basic usage. Source shortcode, with html-escaped output in blue.
 * [[
 * Post thumbnail usage. Works for any post type which supports post thumbnails 
   as well as attachments. Source shortcode, with html-escaped output in blue.
 * [[
 * Attachment examples. Source shortcode, with html-escaped output in blue.

## 安装

 1. Upload the `post-link-shortcodes` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.

## 评价

![](https://secure.gravatar.com/avatar/25e1a73961052a1fc288f15e37f698976e7799196390c0ac1ff54f4314aa1955?
s=60&d=retro&r=g)

### 󠀁[Great plugin, save time](https://wordpress.org/support/topic/great-plugin-save-time/)󠁿

 [betagoo](https://profiles.wordpress.org/betagoo/) 2017 年 7 月 13 日 1 回复

Great plugin, save time

![](https://secure.gravatar.com/avatar/42671dfa029a5b8a4ff1e9bff47a1e4b8b340ea3589485b06629a9b1512ce6c0?
s=60&d=retro&r=g)

 [Mike Zielonka](https://profiles.wordpress.org/mikezielonka/) 2016 年 9 月 3 日

Post Link Shortcodes makes it so much easier for users to create links.

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/)

## 贡献者及开发者

「Post Link Shortcodes」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Evan Mattson ](https://profiles.wordpress.org/aaemnnosttv/)

[帮助将「Post Link Shortcodes」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/post-link-shortcodes)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/post-link-shortcodes/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/post-link-shortcodes/)，或通过[RSS](https://plugins.trac.wordpress.org/log/post-link-shortcodes/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/post-link-shortcodes/)。

## 更新日志

#### 0.4.1

 * FIXED: Unregistered `{type}_archive_url` shortcode

#### 0.4.0

 * NEW: `attachment_src` and `attachment_img` shortcodes
 * NEW: `{type}_src` and `{type}_img` shortcodes for types that support post thumbnails
 * NEW: added filters
 * Various improvements and optimizations under the hood
 * Added support for boolean html attributes

#### 0.3.1

 * Fix a bug where a shortcode would return data for the current page/post when 
   searching for a target post by a slug that does not or no longer exists.

#### 0.3

 * Aliases introduced

#### 0.2

 * Initial release!

## 额外信息

 *  版本 **0.4.1**
 *  最后更新：**7 年前**
 *  活跃安装数量 **40+**
 *  WordPress 版本 ** 3.6 或更高版本 **
 *  已测试的最高版本为 **5.2.24**
 *  语言
 * [English (US)](https://wordpress.org/plugins/post-link-shortcodes/)
 * 标签
 * [custom post type](https://cn.wordpress.org/plugins/tags/custom-post-type/)[post link](https://cn.wordpress.org/plugins/tags/post-link/)
   [post url](https://cn.wordpress.org/plugins/tags/post-url/)[shortcode](https://cn.wordpress.org/plugins/tags/shortcode/)
 *  [高级视图](https://cn.wordpress.org/plugins/post-link-shortcodes/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/post-link-shortcodes/reviews/)

## 贡献者

 *   [ Evan Mattson ](https://profiles.wordpress.org/aaemnnosttv/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/post-link-shortcodes/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LRA4JZYALHX82)