Skip to content

Internal Shortcode Page

EkoJr edited this page Mar 17, 2017 · 12 revisions

These are all the list shortcodes used in List Content which enables you to add post/page data, or related data.

ID/Title

  • [ID] - Post/Page’s unique ID number.
  • [post_name] - Post/Page slug name.
  • [post_slug] - Post/Page slug name.
  • [post_title] - Post/Page title.
URL
  • [post_permalink] - Post/Page permalink/url as configured. #1
  • [guid] - Post/Page unique url.
Time/Date
  • [post_date] - Post/Page publish date.
    • format="m-d-Y” - Display date as formatted. #2
  • [post_date_gmt] - Post/Page publish date in GMT
    • format="m-d-Y” - Display date as formatted. #2
  • [post_modified] - Post/Page last modified date.
    • format="m-d-Y” - Display date as formatted. #2
  • [post_modified_gmt] - Post/Page last modified date in GMT.
    • format="m-d-Y” - Display date as formatted. #2
Author/User
  • [post_author] - Author of Post/Page
    • label="display_name”- Author label value that is displayed (Pre-formatted) #3
Image
  • [post_thumb] - Post/Page’s Featured Image url.
    • size="thumbnail” - Dimension of image file url. #4
    • extract="none” - HTML img in post_content.

Content

  • [post_content] - Post/Page content.
  • [post_excerpt] - Post/Page excerpt.
    • length="250” - Length of Excerpt.

Comments

  • [comment_count] - Post/Page amount of comments.
  • [post_comments] - Post/Page comments. (Pre-formatted HTML)
    • before="” - Before Post/Page comments.
    • after="” - After Post/Page comments.

Parent

  • [post_parent] - Page parent title (w/ link).
    • link="true” - Add as HTML link.

Post Types & Taxonomies

  • [post_type] - Post/Page post type.
    • label="name” - Post type label that is displayed. #5
  • [post_categories] - Post/Page categories.
    • delimiter=", " - Separator to divide categories.
    • links="true” - Add as HTML link.
  • [post_tags] - Post/Page tags.
    • delimiter=", " - Separator to divide tags.
    • links="true” - Add as HTML link.
  • [post_terms taxonomy="category”] - Post/Page taxonomy terms.
    • taxonomy="category” - (Required) Display terms from taxonomy (slug). #6
    • delimiter=", " - Separator to divide terms.
    • links="true” - Add as HTML link.
    • max="0” - Total amount of terms to display.
    • empty_message="” - Display message if no terms are used.

Custom Fields/Meta

  • [post_meta name="”] - Meta value of Post/Page.
    • name="” - (Required) Display value from meta name.

Custom Shortcode

  • [php_function name="”] - Custom shortcode as a PHP function. #7
    • name="” - (Required) Function name.
    • param="” - Param(s) to pass to function.

APL Loop Functions

  • [item_number] - Index/Number to display in each item in a list.
    • offset="1” - Numeric value to start from.
    • increment="1” - Amount to add by.
  • [final_end] - On last item in list, everything after this shortcode will be excluded.

Extensions

  • [post_pdf] - URL to the Post/Page’s PDF file. (Requires Kalin's PDF Creation Station)

1 Configuration for the permalink structure can be located from the WP Dashboard in Settings->Permalinks.

2 String formatting can be found at PHP Date - Format.

3 Author/User labels stored within user data objects. Ex. ID, user_name, display_name, and more.

4 WP’s default image size/dimension is "thumbnail", “medium”, “large”, and “full”. When using custom size “xx, yy”, if (custom) size is not found, the closest image dimension will be used. More info.

5 Post type labels used to display as "name" (plural), “singular_name”, and more.

6 Taxonomy slugs like categories, post_tag, link_category, post_format, and Custom Taxonomies.

7 Refer to this blog post (kalinbooks site) for instructions with custom PHP shortcodes.

Clone this wiki locally