Skip to content

mywp_post

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.

[mywp_post current="1" field="****"]

or

[mywp_post post_id="*" field="****"]

 

Attributes

field=”id

Get the post ID.

[mywp_post current="1" field="id"]

Result

1

 

field=”title

Get the post title.

[mywp_post current="1" field="title"]

Result

Hello world

 

field=”post_type

Get the post type.

[mywp_post current="1" field="post_type"]

Result

post

 

field=”post_status

Get the post status.

[mywp_post current="1" field="post_status"]

Result

publish

 

field=”edit_link

Get the post edit link.

[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.

[mywp_post current="1"]

 

post_id=”****

Get the specific post data.

[mywp_post post_id="1"]

 

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top