這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

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

More

Post Link Shortcodes on GitHub!

螢幕截圖

  • 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.

評價

2016年9月3日
Post Link Shortcodes makes it so much easier for users to create links.
閱讀全部2個評價

貢獻者及開發者

“Post Link Shortcodes” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Post Link Shortcodes 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

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!