-
Notifications
You must be signed in to change notification settings - Fork 7
Internal Shortcode Page
EkoJr edited this page Jul 5, 2017
·
12 revisions
- [ID] - Post/Page’s unique ID number.
- [post_name] - Post/Page slug name.
- [post_slug] - Post/Page slug name.
- [post_title] - Post/Page title.
- [post_permalink] - Post/Page permalink/url as configured. #1
- [guid] - Post/Page unique url.
-
[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
-
[post_author] - Author of Post/Page.
- label="display_name”- Author label value that is displayed (Pre-formatted) #3
-
[post_thumb] - Post/Page’s Featured Image url.
- size="thumbnail” - Dimension of image file url. #4
- extract="none” - HTML img in post_content.
- [post_content] - Post/Page content.
-
[post_excerpt] - Post/Page excerpt.
- length="250” - Length of Excerpt.
- [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.
-
[post_parent] - Page parent title (w/ link).
- link="true” - Add as HTML link.
-
[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.
-
[post_meta name="”] - Meta value of Post/Page.
- name="” - (Required) Display value from meta name.
-
[php_function name="”] - Custom shortcode as a PHP function. #7
- name="” - (Required) Function name.
- param="” - Param(s) to pass to function.
-
[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.
- [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.