Skip to content

Internal Shortcode Page

EkoJr edited this page Jul 5, 2017 · 12 revisions
ID/Title
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
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
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 tutorial for instructions with custom PHP shortcodes.

Clone this wiki locally