Portfolio Projects can be displayed on any page with the Portfolio Shortcode.
[portfolio]
In this guide
To display a Portfolio shortcode on any post or page, click on the + block inserter icon to open the block library and select the Shortcode block.
Paste the following portfolio shortcode into the Shortcode block box:
[portfolio]
For more, visit our detailed instructions page on the Shortcode block.
The shortcode will display projects in different ways, depending on how you use the optional attributes to customize the portfolio layout.
By default, projects of all types are shown by date in ascending order, organized into two columns with visible project types, tags, and an excerpt of the project’s content.
You can customize the way the projects are shown, by adding attributes to your shortcode.
All available options
Option | Description | Choices | Default Setting |
---|---|---|---|
columns | Number of columns to display projects on | numbers 1-6 | 2 |
display_types | Display Project Types | true,false | true |
display_tags | Display Project Tag | true,false | true |
display_content | Display project content | true, false | true |
display_author | Display project author’s name | true, false | false |
include_type | Display only specific Project Types | Specify projects by adding a comma-separated list of Project Type slugs | all |
include_tag | Display only specific Project Tags | Specify tags by adding a comma-separated list of Project Tag slugs | all |
showposts | Set a number of projects to display | Any valid number | all |
order | Display projects in ascending or descending order. | ASC, DESC | ASC |
orderby | Sort projects by criteria, such as author, date, title, or randomly. | author, date, title, rand | date |
Here are a few examples:
Show Portfolio projects in 5 columns, ordered randomly, hide types and content:
[portfolio columns=5 display_types=false orderby=rand display_content=false]
Show Portfolio projects in 3 columns, and hide types, tags, and content:
[portfolio columns=3 display_types=false display_tags=false display_content=false]
Show Portfolio projects in 2 columns, and show an excerpt of the content:
[portfolio display_types=false display_tags=false display_content=true]