To do so, first navigate to the page in wp-admin where you want to add the Portfolio tiles. It can be a new page called “Portfolio”, or you can simply put it somewhere on any of your existing pages or posts.
When you are in the page editor, all you have to do is to place the
[a-folio] shortcode where you’d like to display the Portfolio items.
After saving the page, you’ll have to see something like this in the front end (provided you’ve added some portfolio items):
You can add some parameters to modify the shortcode’s behavior:
[a-folio ids="869,1074"]– if the IDs attribute is added, only the items with the specific IDs will be displayed. It can be a good practice to use it if you’d like to show only some selected portfolio items.
[a-folio exclude="869,1074"]– does the opposite, will leave out the specified IDs from the list. All other items are included.
[a-folio class="my-class"]– adds a user-defined class to the container element (.a-folio). This way you can add special styling to different instances of the shortcode.
[a-folio button_class="my-button-class"]– the button_class attribute adds a special class to the tile’s Button link (if used in the shortcode, it overrides the one in the Plugin Settings)
[a-folio num="10"]– the num attribute sets the number of tiles to be loaded. It accepts a positive whole number as a value. If not set, all the tiles will be loaded by default.
[a-folio pattern_num="1"]– unlike num, the pattern_num attribute represents how many times the pattern should be repeated in the shortcode.
- E.g. if you have a (2 / row + 3 / row) pattern and pattern_num is 1, then the shortcode will end after the 5th tile (2+3).
- If pattern_num is 2 with the same circumstances, it will end after the 10th tile.
- If both num and pattern_num parameters are used, then only the pattern_num will be taken into consideration
[a-folio orderby="date" order="DESC"]– you can change the default order of the tiles with the order and orderby parameters. They work the very same way as WP_Query’s order and orderby attributes.
[a-folio category="my-category,other-category"]– you can filter the displayed tiles by Portfolio Category.
- The value of this attribute must be the category slug.
- You can add more categories to the list if you separate them with a comma.
[a-folio pattern="l2-s41"]– you can override the default pattern setting here that you set up in the Plugin Settings. Values can be the following:
- l2: 2 tiles / line
- l3: 3 tiles / line
- l4: 4 tiles / line
- s14: 1 big + 4 small tiles
- s41: 4 small + 1 big tiles
- if you want to combine patterns, you can separate them with a hyphen. E.g. a pattern that consists of a 2 / line and a 3 / line row should look like: “l2-l3”
[a-folio disable_cta="true"]– value can be true or false. If true then the CTA tile won’t be displayed in the Portfolio stream.
We have set up a page with some working examples here.