In this video we are going to create several galleries in Listable or any other template in WordPress
Subscribe to my channel:
To do the tutorial you need:
- ACF Pro You have it available at premium zone
- Frontend Gallery Slider for ACF You can download from here
The ACF Pro plugin is one of the best plugins that exist for WordPress.
It allows us to create custom fields within WordPress content types
It has a very good but limited free version since it does not allow you to do all the fields that the premium version allows.
Specifically for this tutorial we need to create gallery type fields, that's why we need the premium version.
Once we have the plugin installed and active, a new option called Custom Fields, we go in and create a group of fields.
In this group of fields we are going to add our Gallery fields:
If you look at the image above you can see that I have put in type of Gallery field.
I create all the galleries you want.
So that the field does not appear in all field types and appears only in the lists, I can create a rule so that it only appears in this type of field:
ACF also allows us to choose in which position we want the new field to appear within the list creation screen.
In our case we are going to tell it to do it on the side, in the same way as the main gallery:
Now if we have done everything correctly, we can find that when creating a new list we have the new fields:
Now that we can add the images to our galleries, we do it and we will realize that if we see the list, the new galleries that we have created do not appear.
In order to view the created galleries we need to install the free plugin Frontend Gallery Slider for ACF.
This plugin will allow us to view the fields easily through shortcodes.
In my specific case, what I have done is add an html widget with the following code:
<h3> Galería Platos </h3> [acf_gallery_slider acf_field="galeria_platos"]
We would have to do this with each gallery that we wanted to add and change the name of the field with the name that we have used.
If you enter the listings now you will see that the new galleries already appear:
The good thing about this method is that each listing will have its own galleries:
As you have seen in this tutorial, the ACF plugin gives a lot of power to our website.
I hope you have been useful.
Greetings 😉