Display your portfolio by using the
[portfolio] shortcode. The shortcode accepts a number of parameters offering significant flexibility.
Values marked with a * are the default values and do not need to be specified
- link – image*, page
- Note — as of version 1.3 using this attribute is not recommended, as setting the value here in the shortcode will override any individual portfolio item settings.
- Image is the only officially supported attribute at this time. Setting that value to page would likely require the user to create a
single-portfolio.phpfile, write the code necessary to handle a page dedicated to that post type and place that file in their theme’s directory. Since each theme’s structure is different, there’s no real way for the plugin to be able to natively handle that. Here’s a basic tutorial on how to link to pages.
- thumb – *portfolio-thumb, any registered image size
- portfolio-thumb is an image size added by the plugin, however the user can use any available size, or utilize the ‘add_image_size’ function to add their own thumbnail and call it here.
- full – *portfolio-large, any registered image size
- As above, portfolio-large is an image size added by the plugin and is is called when the ‘link’ attribute is set to ‘image’, however the user can use the ‘add_image_size’ function to add their own image and call it here. Please note that if ‘link’ is set to ‘page’ or ‘external’, this attribute is ignored.
- title – *above, below
- Determines whether the portfolio item’s title is displayed above or below the image.
- title_link – *false, true
- Setting this value to true will wrap the portfolio title in a hyperlink in addition to the portfolio image
- heading – *Display, user-defined
- This is the heading displayed to the left of the feature terms, which can be set to any value desired
- display – *blank, content, excerpt
- If set to ‘content’ or ‘excerpt’, the text entered into the text editor box during the creation of the portfolio item will be output here in either its entirety (content) or truncated (excerpt). If left alone, the plugin will display nothing from the text editor.
- orderby – *date, any valid parameter
- Determines how the portfolio items are sorted. Accepts any valid orderby parameter
- order – *desc, asc
- Orders the items in descending or ascending order
- terms_orderby – *name, any valid parameter
- Determines how the features (if used) are sorted. Accepts any valid orderby parameter
- terms_order – *asc, desc
- Orders the features in descending or ascending order
- terms – *blank
- Enter one ‘feature’ tag (in slug form) to filter by. It can be included or excluded based on the operator tag below.
- operator – *IN, NOT IN
- When set to ‘IN’, only portfolio items assigned to the chosen terms parameter will be displayed
- When set to ‘NOT IN’, the shortcode will display any portfolio NOT in the chosen terms parameter