Skip Navigation

[Résolu] Interactive Gallery from a Custom Post Type

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 6 réponses, has 3 voix.

Last updated by Craig Il y a 8 années et 9 mois.

Auteur
Publications
#33578
Screenshot_03_01_2013_16_50.png

Is it possible to create a Gallery from a CPT which updates a another part of the page (DIV) when I click on an image with the content form another entry in that CPT.

e.g. I have 8 Staff member entries in a CPT and would like to display the relevant biog and contact details when that persons photo is clicked on.

I have attached an image which shows roughly what I would like to achieve.

Hope someone can provide a definitive answer.

Cheers,
Craig

#33627

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi Craig,

You can try create a custom Javascript for it.
Please let me know if you need assistance to do it

Regards
Luo

#33650

Hi Luo,

I'm no good with creating custom JavaScript from scratch I'm afraid, so if you were prepared to help, that would be fantastic.

Would it be easier/possible to just create individual pages and link the images through to each individual page?

If the JavaScript would be a better solution, I'm all for it, as it would be a cleaner solution. If it would involve paid help, please let me know.

#33651

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Yes, It is easier&possible to just create individual pages and link the images through to each individual page.
And if you need JS solution, please set a test site using our http://discover-wp.com system. create a demo page with images, where I can create a demo JS for your reference.

Here is a description for why and how to do this:
https://toolset.com/faq/how-and-why-to-create-a-test-site-in-discover-wp/

Thank you

#33696

Hi Luo,

JavaScript would definitely be a better solution, so I have added a page to my Discover-WP site at hidden link

I have added the Types and Views I have on my own development site and have added in 4 images (the same image 4 times) with sample data.

Login is at hidden link

Please let me know if you require anything else from me.

Kind regards,

Craig

#33942

Anonyme

Hello Craig.

Please check hidden link.
Hope that you will be happy with results.

if all is ok - you can update your site in few simple steps:
1. add all required data to "Senior and Professional Staff" view. All please use class="hidden" for hide unused elements and container for identification data as at example.
2. in "Staff Member Biog" view put each of data to different container with identifier as at example.
3. create a simple .js file with content as at hidden link
4. put url to this file to "Senior and Professional Staff" in "Additional Javascript files to be loaded with this View (comma separated):" section as at example.

Please let me know if there is anything else that I can assist you with.

Regards,
Vladimir

#33968

Wow, Vladimir, that is awesome, thank you so much.

I can see exactly what you have done and I should definitely be able to learn from what you have provided.

Many, many thanks for this. It is really appreciated 🙂

Kind regards,

Craig