Description
mywp_post
shortcode can be get the specific post or current post data.
Usage
This shortcode must be post id or current post id and “field” attribute is must have a value.
1 | [[mywp_post current="1" field="****"]] |
or
1 | [[mywp_post post_id="*" field="****"]] |
Attributes
field=”id“
Get the post ID.
1 | [[mywp_post current="1" field="id"]] |
Result
1
field=”title“
Get the post title.
1 | [[mywp_post current="1" field="title"]] |
Result
Hello world
field=”post_type“
Get the post type.
1 | [[mywp_post current="1" field="post_type"]] |
Result
post
field=”post_status“
Get the post status.
1 | [[mywp_post current="1" field="post_status"]] |
Result
publish
field=”edit_link“
Get the post edit link.
1 | [[mywp_post current="1" field="edit_link"]] |
Result
https://example.com/wp-admin/post.php?post=***&action=edit
current=”1“
Get the current post data.
1 | [[mywp_post current="1"]] |
post_id=”****“
Get the specific post data.
1 | [[mywp_post post_id="1"]] |
This Post Has 0 Comments