Fancy Box - nur 1 Thumbnail

  • Hallo,

    was ich gerne möchte:
    1 Bild, bei Klick öffnet sich die FancyBox, welche aber eine ganze Galerie enthält.

    Ich habe dazu folgendes in der Doku von FancyBox gefunden:

    --
    Can I use ONE thumbnail to open a complete gallery ?

    It can be done manually (using the internal WordPress gallery feature, or not) or in combination with NextGen Gallery.

    A. Open your post for editing in HTML mode and insert the first image thumbnail in your post content (linking to the images file, not page) to serve as the gallery thumbnail.
    B. Place the following code to start a hidden div containing all the other images that should only be visible in FancyBox:
    <div class="fancybox-hidden"> C. Right after that starting on a new line, insert all other images you want to show in your gallery. You can even use the WordPress internal gallery feature with the shortcode [gallery link="file"]. NOTE: if the gallery thumbnail is attached to the post, it will be show a second time when flipping through the gallery in FancyBox. If you do not want that, use an image that is not attached to the post as gallery thumbail.
    D. Close the hidden div with the following code on a new line:
    </div>

    --


    Leider funktioniert es nicht: Ich sehe zwar das Thumbnail, bei Klick öffnet sich aber nur dieses und nicht die anderen Bilder.

    Hier mein Code:

    Code
    [gallery link="file" ids="95"]
    
    
    <div class="fancybox-hidden">
    [gallery link="file" ids="95,188,186,65,199"]
    </div>


    Hat jemand eine Idee wie ich das umsetzen kann?

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!