I am trying to add the checkbox field to an image gallery so I can check/select the image I want to use later in listings, but with no success. Is it doable?
The image gallery is in Attraction CPT.
Also, I wonder how to build 2 admin pages (in the WP dashboard) so I can select/filter the images from the CPTs? (mockups are in the attachment).
Hello, Toolset doesn't really help you create new pages in wp-admin like this. I can show you how to use Forms on the front-end of the site to edit or create posts, or to establish post relationships between two posts. Forms works on one post or one pair of posts at a time, not multiple posts. So a table with rows of edits like this isn't possible.
Page 1 looks like a custom search View. I'm not sure how Continent Country Region and Destination are set up on this site. Are they custom fields, or taxonomies, or something else?
It is a shame that Admin pages can't be made in Toolset. Can you suggest some other solutions and how I can accomplish it using Toolset?
Continent, Country, Region, Destination, Attractions are CPTs in relationships one-to-many (One continent has multiply countries but one country has only one continent ... etc.)
Can you answer the first question? How to add a checkbox to an image in image gallery? The image gallery was built using repeater fields.
I can give you admin credentials to look from inside, so if you can make this post private.
How to add a checkbox to an image in image gallery? The image gallery was built using repeater fields.
There's no way to add a checkbox to each instance of a repeating image field. You could create a repeatable field group (RFG) if you want to have a checkbox or other custom fields associated with each item, but I'm not sure how that would work with your gallery on the front-end. Some galleries are made with repeating image fields, and not designed to work with RFGs.
thank you for your assistance and idea about RFG. I made it (see the attachment).
Now, I need assistance for displaying these images (filter by checkboxes) as a listing.
For instance: hidden link scroll down and find "Discover" section, this listing is set by a View (Testing Discover on Region template). Items in this listing are related to the region (Paris & Northwestern France) and it should be displayed with images we choose from the Image gallery (with checkboxes).
Okay so let me make sure I understand. You have these "Attraction" posts. Each Attraction post has a RFG of images. On the Attraction post page, you would like to display a grid of images. For example, all the Home Discovery images, or all the Continent Discovery images. Is that correct?
If that is correct, then I assume you have created an Attraction post template. Next, follow these steps:
- Create a View of the Image Gallery RFG
- Add a Post Relationship Query Filter. If you cannot find the Query Filter editor, scroll to the top right corner of the View editor and click "Screen Options". You can turn on the Query Filter editor here.
- The Query Filter should be set to "select items in the RFG group that are related to the post where this View is shown". See qf.png for an example. In this example, my RFG is called "book rfg group" but yours will be something else related to image gallery.
- Add another Query Filter, and this time select one of the checkbox custom fields, like "Home Discovery". Configure it to test that the checkbox field is equal to 1. This is the normal setting unless you chose something else when creating the checkbox field, see val-to-store.png. The Query Filter should be equal to the "Value to Store" from your checkbox field.
- Use the Loop Wizard to create a Bootstrap Grid, and insert the custom field image in the loop.
Insert this View in the template for the Attraction post. Let me know if you get stuck.
Hi Christian, thanks for your help, but I don't get any result.
I guess we have don't understand each other very well, so I will try to explain better this time.
I've got 5 CPTs ( Continent -> Country ->Region -> Destination -> Attraction ) in relationships one-to-many. All the data are in Attractions CPT. I need to display related posts in, for instance, Region page (see Image 03). I've built Image gallery as RFG with image and checkboxes, I want to display images only with Region Discovery checkbox checked. (see Image 04).
You can see the View I've used (see Image 02) and settings for the checkbox field (see Image 01).
Yes, that's right. I want to display the images of respective Attractions (checked by the checkbox) where the Destination is related to the Region.
The same will go for the level up (display the respective images of Attraction checked by the checkbox where the Destination is related to Region who is related to Country).
In the end, the same will go for the Continent (images from Attraction who is related to Destination, who is related to Region, who is related to Country).
It looks rather complicated, but the idea is as follows: when you select the Continent (Europe for example) I want to display all the respective Attractions (images in this case) who are related to Continent (Eiffel Tower, Coliseum, London Bridge for example). The same will go respectively for Country, Region or Destination.
In order to display the images on the region you will need to create a child view that will list out the regions destination based on the currently viewed region.
Then you will need to create another view for attractions and add a relationship filter to the Attractions view, then add this view to the Destinations view.
This is how you will be able to see the images that are associated with a region.
Would you like for me to setup an example for you so you can see this working ? Or are you familiar with setting this up.
I will need assistance with this. Can you use a View called "Testing Discover on Region Template" which is inserted in the Regions template built with Elementor. This way we will be able to see the changes in the Discover section right away hidden link (scroll down to the bottom of the page). In the previous messages, I've sent my login credentials.