wp.get

/ Core / wp.get

Title : wp.get
Purpose : To get the WordPress specific values of posts, users, taxonomy etc. It is a general-purpose shortcode.
Syntax :
Input Parameters : default: used to return default value in case of wp.get does not returns any values.
Return Value : depends on the parameters specified, check the examples below.
Example  : see various examples and supported parameters below.

Examples:

To get the attachment URL

To get the Alternate text set for media

To get the details of an attachment

To get breadcrumbs in the single post page

To get the next post, the previous post of a given post

To get widgets registered within the sidebar

To get options saved with WordPress

To sideload a media to post and get the updated URL

To access wpdb object, especially for getting table prefix etc.

To access global post object

To access active wp_query object

To access the details for currently logged in user

To get the link of a term

To access the term meta of a taxonomy term

To generate a nonce

To verify the nonce

To get all the terms attached to a post

 

 

Categories
Most Popular

Leave a Reply

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