Display Post Link

By Alian Schiavoncini

0+ active installationsVersion 1.1.0

Display WordPress post/page links (homepage, blog, privacy, etc.) via shortcode in post/page content or widget area.

Description

This plugin was designed to return the correct link to the special WordPress pages such as the homepage, blog, privacy policy, etc.
The [display-post-link] shortcode must be used in combination with a Name to display the link.
Example [display-post-link id=”privacy-policy”]

Main WordPress options names:

  • homepage
  • blog
  • privacy-policy

WooCommerce options names:

  • woocommerce-shop
  • woocommerce-terms
  • woocommerce-cart
  • woocommerce-myaccount
  • woocommerce-checkout
  • woocommerce-refund-returns

Note: WooCommerce plugin must be installed and active if you would like to use the WooCommerce options names.

It is also possible to use the numeric post/page ID instead of the name. The link is displayed only for published posts and pages: if the post is deleted, unpublished, private or password-protected, nothing is displayed.

Custom title
A custom_title parameter can be used to display a custom text link instead of the post/page title.
Example: [display-post-link id=”privacy-policy” custom_title=”Check it out our Privacy Policy!”]

Compatible with WPML plugin.

Wordefence vendor verification key

gsphudo7by90lzwdlihyerqxbzj6jiln

Installation

  1. Upload the entire display-post-link folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins screen (Plugins > Installed Plugins).

Screenshots

Changelog

1.1.0

  • Changed: the shortcode is now rendered by display_post_link_shortcode(). The unprefixed display_post_link() function is deprecated: it still works, but it is declared only if no other code has declared that name first, which avoids a fatal error in that case. It will be removed in a future major version.

1.0.6

  • Security: the shortcode now links only to published posts and pages of public post types. Drafts, pending, scheduled, private and password-protected posts are no longer displayed, so users with the Contributor role or above can no longer reveal their titles and links. This also applies to the homepage, blog, privacy policy and WooCommerce page names.
  • Fixed: the woocommerce-shop name now checks that WooCommerce is active, like the other WooCommerce names.

1.0.5

  • Compatibility: tested with WordPress 7.1.

1.0.4

  • Compatibility: tested with WordPress 7.0.
  • Changed: the readme now declares the same minimum requirements as the plugin header (WordPress 5.2, PHP 7.4). The previous values (WordPress 3.0.1, PHP 5.2.4) were never enforced, since WordPress reads the header.
  • Changed: added the DISPLAY_POST_LINK_VERSION constant.

1.0.3

  • Added full compatibility with WordPress version 6.8.3
  • Added Wordefence vendor verification key

1.0.2

  • Security and performance enhancements
  • Added full compatibility with WordPress version 6.6.1.

1.0.1

  • Added WooCommerce Return and Returns Policy page
  • Added plugin screenshots

1.0.0

  • Initial version