Appearance, Shortcodes

Portfolios »Portfolio Shortcode

You can use shortcodes to embed portfolio projects on posts and pages.

Embedding Portfolio Projects

To embed portfolio projects on posts and pages, first activate the Portfolio custom content type on your site and add some projects to your portfolio.

Next, add the [portfolio] shortcode to a post or page. The shortcode will display projects in different ways, depending on how you use the optional attributes to customize the portfolio layout.

Example of the shortcode in the Illustratr theme

Example of the shortcode in the Illustratr theme

 

Attributes

  • display_types: display Project Types. (true/false)
  • display_tags: display Project Tags. (true/false)
  • display_content: display project content. (true/false)
  • include_type: display specific Project Types. Defaults to all. (comma-separated list of Project Type slugs)
  • include_tag: display specific Project Tags. Defaults to all. (comma-separated list of Project Tag slugs)
  • columns: number of columns in shortcode. Defaults to 2. (number, 1-6)
  • showposts: number of projects to display. Defaults to all. (number)
  • order: display projects in ascending or descending order. Defaults to ASC for sorting in ascending order, but you can reverse the order by using DESC to display projects in descending order instead. (ASC/DESC)
  • orderby: sort projects by different criteria, including author name, project title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)

↑ Table of Contents ↑

Example

[portfolio display_types=true display_tags=false include_type=ui-design,app-design columns=3 showposts=10 orderby=title]
The example will display up to ten portfolio projects in three columns, in ascending alphabetical order by project title. It will display Project Types, hide Project Tags, and only display projects that are assigned the “UI Design” or “App Design” Project Types.

Example of the shortcode in the Espied theme

Example of the shortcode in the Espied theme

Not quite what you're looking for?

Get Help