wp_portfolio
Above is the default WP Portfolio shortcode that is used to display the portfolio on the page/post.
You can customize the shortcode to display/hide some sections of the portfolio using attributes. Related attributes and their usage are listed below –
Shortcode Attribute | Value | Use |
---|---|---|
show-categories | yes/no | Display categories names in the top bar of the portfolio. |
categories | category id number | Accepts category IDs separated by comma. Portfolio assigned with these categories will display. |
show-other-categories | yes/no | Display other categories names in the top bar of the portfolio. |
other-categories | other category id number | Accepts category IDs separated by comma. Portfolio assigned with these categories will display. |
tags | tag id number | Accepts tag IDs separated by comma. Portfolio assigned with these tags will display. |
show-search | yes/no | Show search box in the top bar of the portfolio. |
columns | number of columns | Number of columns to display portfolio. |
show-portfolio-on | scroll/click | Decide load more portfolio items on a scroll or on click of the button. By default it’s scroll. |
per-page | number of portfolios | Decide number of portfolios that will display on each scroll or on button click. |
show-quick-view | yes/no | Decide whether to display Quick View button on portfolio. Button will be visible on hovering the portfolio. |
quick-view-text | Custom Text | Enter a custom text for the Quick View button |
other-category-show-all | yes/no | Decide to display “All” tab for Other Categories. |
category-show-all | yes/no | Decide to display “All” tab for Categories. |
Below is the example of shortcode with all attributes –
wp_portfolio show-categories="yes"categories="1,2,3,4" show-other-categories="yes" other-categories="5,6" tags="10" columns="2" show-search="no" show-portfolio-on="click" per-page="4" show-quick-view="yes" quick-view-text="My Quick View Text" other-category-show-all="yes" category-show-all="yes"
Note: If default shortcode wp_portfolio
is not displaying all menu sections then check Display settings. Read How to Hide Portfolio Menu Panel?
Related Documents –
How to Get the ID for Categories, Other Categories, and Tags?