## WEBphysiology Portfolio Page Shortcode Options

The WEBphysiology Portfolio is implemented utilizing a [shortcode]. There are a couple of options that may be specified with the shortcode to further control the display of the Portfolio on a given page.

The following are the allowed set of [webphysiology_portfolio] shortcode parameters:

portfolio_type : This string parameter will filter the portfolio items being displayed based upon the assigned Portfolio Type. Multiple Portfolio Types may be referenced, just separate them with commas. Preceding a Portfolio Type with a dash will signify to exclude any Portfolios with that type assigned. (default empty)

id : This string parameter allows for the ability to encapsulate the Portfolios returned by the shortcode within a <div> of the specified id. (default empty)

max_nav_spread : This numeric parameter determines the maximum number of actual numbers that are displayed within the page navigation buttons. (default 5)

thickbox : This boolean (true/false) parameter allows for the ability to override the Portfolio Options setting specifying the image click behavior. Setting the value to “true” will result in displaying any Portfolios, for this instance of the shortcode, within a thickbox where appropriate. Setting it to “false” has the opposite effect. (defaults to current Portfolio Options setting)

per_page : This numeric parameter allows for the ability to override the Portfolio Options setting specifying the number of Portfolios to display on a given page. This can be handy if you use more than one Portfolio shortcode on a given page and want to have both instances records overlap onto the same number of subsequent pages. (defaults to current Portfolio Options setting)

credit : This boolean (true/false) parameter allows for the ability to override the Portfolio Options setting specifying whether to display the plugin credit. This can be especially handy if you use the Portfolio shortcode more than once on a given page. Setting the value to “false” will result in not displaying the credit for that instance of the shortcode. Setting it to “true” will display the credit. (defaults to current Portfolio Options setting)

### Example Use of the [webphysiology_portfolio] Shortcode

The following covers just a few of the variety of ways to specify the Portfolio shortcode:

    [webphysiology_portfolio]

Specifying just the Portfolio shortcode will result in all entered Portfolios being displayed.

    [webphysiology_portfolio portfolio_type=red]

Specifying a single Portfolio Type parameter will result in a Portfolio listing that only contains Portfolios that have the specified Portfolio Type assigned. Important Note - make certain to specify the proper Portfolio Type slug value as WordPress may have altered what you had entered as the slug if it had already been used (e.g., as a Post Tag). For example, you may have entered "red" as your slug but WordPress may have appended a number, resulting in the slug actually being set to "red-1".

    [webphysiology_portfolio portfolio_type=red,white,blue]

Specifying more than one Portfolio Type will result in a Portfolio listing that contains Portfolios that have the specified Portfolio Types assigned.

    [webphysiology_portfolio portfolio_type=-red]

Specifying a single Portfolio Type parameter with a dash before it will result in a Portfolio listing containing all Portfolios except for those with the specified Portfolio Type.

    [webphysiology_portfolio portfolio_type=red,-white,blue,-yellow]

You may mix and match any number of Portfolio Types to include or exclude. Those beginning with a dash will be excluded while all those without would be included. In this example, Portfolios with a type of red and blue would be included where white and yellow would be excluded.

    [webphysiology_portfolio max_nav_spread=3]

Specifying the max_nav_spread will affect the display of the navigation control. This control will exist anytime the number of Portfolios extends beyond the number that are displayed per page. The max_nav_spread option controls the width of this control. For example, if one were to specify 3, then the control, at it's widest, would consist of 7 control buttons; first, previous, 1, 2, 3, next, last. The default behavior is an argument of 5.

    [webphysiology_portfolio]enclosed text[/portfolio]

The Portfolio [shortcode] allows for the ability to enclose text between open/close shortcode tags. The result will be that the text enclosed between the opening and closing shortcode tags will be displayed above the Portfolio Listing. One also could simply place text before or after the [webphysiology_portfolio] shortcode. NOTE: If you include text between shortcode tags, you must do it for all [webphysiology_portfolio] shortcodes used on a given page.

Note: You may include more than one Portfolio shortcode on a given page. This may be handy if you want to break up your portfolio based upon a given type but not split them onto separate pages. For example, perhaps you are using the plugin to manage folks on a video production crew and you assign them a "Portfolio" type based upon their role. You then could display your Portfolio entries on one page by role as follows:

    <h2>Director</h2>
    [webphysiology_portfolio portfolio_type=director]

    <h2>Screenwriters</h2>
    [webphysiology_portfolio portfolio_type=screenwriter]

    <h2>Cameramen</h2>
    [webphysiology_portfolio portfolio_type=cameraman]

The one major thing to understand here, however, is that Portfolio navigation may break the look as the number of entries per page that you specify in the Portfolio options is tied directly to the use of a given shortcode. So, if you specify three items per page and you have one director, two screenwriters and five camermen, the results will be that page one lists all of the directors and screenwriters and the first three cameramen. Navigating to page two will show a “no records found error” for the directors and screenwriters and list the remaining two cameramen.