Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

Post Link Shortcodes

A collection of shortcodes for building links, images, or URLs to a given post/archive of any type.

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

Author Evan Mattson
Profile
Contributors aaemnnosttv
Tags custom post type, custom post type link, custom post type url, post link, post url, shortcode, shortcodes
  1. post-link-shortcodes screenshot 1

    Basic usage. Source shortcode, with html-escaped output in blue.

  2. post-link-shortcodes screenshot 2

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

  3. post-link-shortcodes screenshot 3

    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.

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!
Share  
Download
Version 0.4.1

Requires WordPress version: 3.6 or higher

Compatible up to: 4.6.3

Last Updated 01 Sep 2016

Date Added: 27 Aug 2013

Plugin Homepage

Evaluation
star1
star2
star3
star4
star5

5 stars
1 ratings
1,134 downloads

Compatibility

Not Enough Data

Reports:
Works: 0
Broken: 0