|

WP Portfolio ShortCode and Attributes

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 AttributeValueUse
show-categoriesyes/noDisplay categories names in the top bar of the portfolio.
categoriescategory id numberAccepts category IDs separated by comma. Portfolio assigned with these categories will display.
show-other-categoriesyes/noDisplay other categories names in the top bar of the portfolio.
other-categoriesother category id numberAccepts category IDs separated by comma. Portfolio assigned with these categories will display.
tagstag id numberAccepts tag IDs separated by comma. Portfolio assigned with these tags will display.
show-searchyes/noShow search box in the top bar of the portfolio.
columnsnumber of columnsNumber of columns to display portfolio.
show-portfolio-onscroll/clickDecide load more portfolio items on a scroll or on click of the button. By default it’s scroll.
per-pagenumber of portfoliosDecide number of portfolios that will display on each scroll or on button click.
show-quick-viewyes/noDecide whether to display Quick View button on portfolio. Button will be visible on hovering the portfolio.
quick-view-textCustom TextEnter a custom text for the Quick View button
other-category-show-allyes/noDecide to display “All” tab for Other Categories.
category-show-allyes/noDecide 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_portfoliois 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?

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page
Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon