Resources

Shortcodes

Overview

Included in Platform 5 are shortcodes specific to the Platform plugin that you can use in all themes.

Shortcodes work in posts, pages, widgets and even hooks. For a comprehensive guide on WordPress shortcodes, check out the WordPress Codex.

How to use Shortcodes

Shortcodes can be added to any page, post or widget by adding the shortcode as shown in the examples below.

When adding/editing a page or post, a Shortcode Generator button appears above the editor window next to Add Media.

Shortcode Generator

This button allows you to insert shortcode(s). Simply click the Shortcode Generator button and a popup window will appear with all available shortcodes.

Shortcode Buttons

Click the shortcode you wish to insert and configure the shortcode using the options. When you have configured the shortcode, click the "Insert Shortcode" button.

Shotcode Config

Section(s)

The section shortcode allows you to insert all Platform 5 sections into pages, posts and widgets. The generated shortcode can even be used in hooks. Click the "PageLines Section" to bing up the section shortcode configuration options.

Shortcode Section Config

Section ID

Allows you to select all sections available in Platform 5 from the drop-down menu.

Unique ID

Allows you to add a unique section ID. Can be any combination of numbers and letters.

Tip! Reference the same section data across pages, posts, widgets or hooks by using the same ID. This allows you to configure a section once that can be used multiple times throughout your site.


[pl_section section="Section ID" id="Unique ID"]

Social Buttons

Allows you to add Facebook or Twitter buttons to pages, posts, so you or a visitor can share them on Facebook/Twitter.


[pl_facebook_like url="Like URL"]

[pl_twitter_follow username="Twitter Username"]

Site Logo URL

Quickly insert your site logo URL to any page, post or widget using the Site Logo URL shortcode. This shortcodes uses the Default Logo option via the PageLines global settings. If a third-party theme is used, the logo image uploaded via that themes settings URL will be displayed.


[pl_logo_url]

Site Logo Image

Quickly insert your site logo image to any page, post or widget using the Site Logo Image shortcode. This shortcodes uses the Default Logo option via the PageLines global settings.

Two options are available to configure the shortcode, Image Link and Image Alt Text.


[pl_logo_img href="#" title="#"]

Post Meta

Add meta information to your pages, posts or widgets using the meta shortcodes. There are several post meta options to choose from, these are:

  • Post time, adds the time to posts.
  • Post Date, adds the date to posts.
  • Post Categories, add the categories to post.
  • Post Tags, adds the tags to posts.
  • Post Comments, adds comments to posts.
  • Post Edit, adds a edit link to your page, post or widget.
  • Post Author, adds an author link to your page, post or widget.

[post_time]
[post_date]
[post_categories]
[post_tags]
[post_comments]
[post_edit]
[post_author]