mdopsch
Forum Replies Created
-
Forum: Plugins
In reply to: [Featured Galleries] display galleries on frontend post.phpThanks Andy, though I’m not a developer just a designer it works for me now. And I even learned a bit more PHP. Good work, good support.
Forum: Plugins
In reply to: [Featured Galleries] display galleries on frontend post.phpSo I added this to my content-single.php
All the images in the gallery are displayed and linked.<?php $galleryarray = get_post_gallery_ids($post->ID); foreach ($galleryarray as $id) { $imagesize = wp_get_attachment_image_src( $id, 'thumb' ); ?> <a href="<?php echo $imagesize[0]; ?>"> <img src="<?php echo wp_get_attachment_url( $id ); ?>"></a> <?php } ?>But the (Huge IT) lightbox shows one image twice.
I guess it has something to do with the
$attachment_meta = wp_get_attachment( $id );Forum: Plugins
In reply to: [Featured Galleries] display galleries on frontend post.phpIs there a way to show only the first image and link it to a lightbox gallery?
I found one half working solution in you support forum:
Show featured gallery in fancyboxBut this function is not recognized by wordpress:
$attachment_meta = wp_get_attachment( $id );Forum: Plugins
In reply to: [Featured Galleries] display galleries on frontend post.phpOkay; I’ve found the problem
<?php $galleryArray = get_post_gallery_ids($post->ID); ?> <?php foreach ($galleryArray as $id) { ?> <img src="<?php echo wp_get_attachment_url( $id ); ?>"> <?php } ?>Now the images appear.
Forum: Plugins
In reply to: [Featured Galleries] display galleries on frontend post.phpHi, ok i understand, thanks for your answer.
Now I’ve tried it like this:
<?php $galleryArray = get_post_gallery_ids($post->ID); ?> <?php foreach ($galleryArray as $id) { <img src="<?php echo wp_get_attachment_url( $id ); ?>"> <?php } ?>Still getting an error.