How to use the shortcode in Companion Portfolio

How to use the shortcode in Companion PortfolioCodeerMeneerHow to use the shortcode in Companion PortfolioSince version 2.2 we’ve introduced a block for the new gutenberg editor that comes with WordPress since version 5.0. While we will continue to update this block with more features and thus recommend this block over the shortcode we will not drop the shortcode. But, we will remove the shortcode generator from the plugin in a future […]

Papin Schipper in Documentation and TutorialsHow to use the shortcode in Companion Portfolio

Since version 2.2 we’ve introduced a block for the new gutenberg editor that comes with WordPress since version 5.0. While we will continue to update this block with more features and thus recommend this block over the shortcode we will not drop the shortcode.

But, we will remove the shortcode generator from the plugin in a future update. Instead, we’ll explain how to use the shortcode on this page.

Shortcode parameters

The shortcode will alow the following parameters (with their default values).

'limit'         => '-1', // -1 to show all     
'sortby'        => 'name', // Supports 'name', 'id' or 'date'   
'columns'       => '2',  // Value between 1 and 5   
'showdate'      => 'true',     
'showexcerpt'   => 'false',     
'showcategory'  => 'false',

Use the basic version

The basic shortcode will load the your portfolio with default settings.

companion-portfolio

Use the parameters

Using the parameters you can modify the output given by the shortcode. Simply add parameter=”value” to the shortcode like so:

companion-portfolio limit="4" showdate="false"