Install the plugin via the WordPress Dashboard, upload the zip file and activate.
To get the plugin working you need to have Featured Images attached to the pages / posts / custom post type that you’re going to work with.
The plugin requires a theme that supports the WordPress Featured Image, to check that your theme does, you should see the Featured Image option pictured above on your pages and posts.
The plugin settings, accessible from the WordPress Dashboard > Settings > Custom Post WP Gallery are used to configure the behaviour.
First up choose the object type that you would like to use. Options here are:
- Any registered Custom Post Type
Gallery Image Size
When the image gallery is displayed, you can control the size of the images. By default themes that support Featured Images will have a default thumbnail created.
If you have registered other thumbnail sizes or your theme has registered images sizes they will also appear here as options.
Choose the number of columns that you would like your gallery to be displayed in: 1, 2 or 3.
Finally, you can choose to display the post titles (linking to respective entries) and/ or the taxonomies (categories / tags). Titles are displayed on top while taxonomies are displayed below each image.
To display your image gallery on a page or post, insert the shortcode [cpwp-gallery].
By default this will display a gallery with all of the featured images, from all of the objects you’re working with. So for example if you’ve chosen pages, it will include all pages that have featured image attached.
If you’ve working with a custom post type acme_products it will do the same, display all of the posts in this custom post type.
The plugin supports custom taxonomies and these can be used to filter the items that are displayed with the shortcode.
If you’re using a taxonomy location, and you have posts that are tagged with Sydney and London you can use this syntax to create a gallery of each.
This will filter the output and show you only posts that are tagged with either one of the terms.