Your Spaces are all available at the archive page, usually ‘/spaces’. However, you can also display a list of Spaces using the Spaces Shortcode. This article explains how to use the shortcode, and what parameters you can use to control it.
The Basics
To use the shortcode with default settings, simply insert [spaces_index] wherever you want to show the usual grid of Spaces. If you are new to shortcodes, there is a help guide here.
Parameters
Let’s look at the parameters you can use to further refine how your Spaces Index will look. Remember, parameters need to be typed exactly, followed by an equals sign, and then quotation marks.
title
Determines whether the ‘Spaces’ title will be shown above the grid. Default: yes.
actions
Determines whether to display the Action Bar. This is the horizontal menu that shows ‘All Spaces’, ‘My Spaces’ and a link to create a new Space. Default: yes.
filters
Determines whether to display the Filters. This is the box that shows dropdowns such as categories and locations. Default: yes.
categories
This parameter allows you to predefine a particular category (or set of categories) that you want the grid to be associated with. For more than one, separate with a comma. If you set categories manually, the filter box will be deactivated. Default: no categories will be added.
locations
This parameter allows you to predefine a particular location (or set of locations) that you want the grid to be associated with. For more than one, separate with a comma. If you set locations manually, the filter box will be deactivated. Default: no locations will be added.
per_page
Set the number of Spaces you want to display per page. Default: 12.
Case Study: Avengers 10th Anniversary
Your movie community has created Spaces for every movie convention and Comic-Con across the whole of the United States. To celebrate the 10th anniversary of the Avengers movie, you have written a blog post all about it. At the end of your post, you want to display the Spaces you think your members might want to explore.
As it is part of a blog post, you don’t need the title. You also don’t want the action bar, or the filters, as you want to just pinpoint a certain category. You don’t need to specify a location, as your blog post covers the whole of the US. You also don’t want the list to be huge, as then people will need to do heaps of scrolling to get to the all important comments section. So you decide on a shortcode that looks like this:
[spaces_index title="no" categories="marvel" per_page="4" actions="no"]
We hope this has covered most of the questions you may have about the Spaces Shortcode. If you need more specific assistance, please open a support ticket with us and we’d be glad to help you further.