Shortcodes
How to use shortcodes
Available shortcodes
ACPT exposes different shortcodes to display meta fields.
[acpt]
Display custom post-type meta fields.
Usage example:
It's possible to specify the post ID:
If not provided, the global $post
object will be used to get it.
[acpt_tax]
Display taxonomy meta fields.
Usage example:
It's possible to specify the term ID:
If no tid
or terms are provided, the get_queried_object()
is used to try to fetch the term ID.
[acpt_option]
Display an option page meta field.
Usage example:
Where page
is the page's slug.
[acpt_user]
Display user meta fields.
Usage example:
It's possible to specify the user ID:
If uid
is not provided, the user of logged-in user is used.
[acpt_media]
Display attachment meta fields.
Usage example:
In this case, it's mandatory to specify the attachment ID.
Other arguments
Here is the complete allowed arguments list:
Example: date field
Suppose you want to use a custom date format address.
Use the following syntax:
Example: email field
Suppose you have an email field and want to display it as mailto
link.
Do the following:
Instead, if you want to display just the email as a text string:
Last updated