Tagged: x
-
AuthorPosts
-
August 17, 2016 at 4:49 am #1134933
daviddunningtonParticipantMorning Guy’s
I have created an image gallery on a portfolio page however on the archive page I cant click through to the portfolio item. The same thing happens on one of the demo sites http://demo.theme.co/icon-10/creative/ if you scroll down to the bottom you should see the portfolio item with the image gallery. Can I ask is there a way to make it possible for this to be clickable to open the portfolio item page?
August 17, 2016 at 4:57 am #1134943
daviddunningtonParticipantI have attached an image for you
August 17, 2016 at 8:00 am #1135142
Paul RModeratorHi,
The gallery is only meant to show images in a slider.
To link it to your portfolio item, you can add this in your child theme’s function.php file.
function x_featured_gallery() { $stack = x_get_stack(); $thumb = get_post_thumbnail_id( get_the_ID() ); $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false; $args = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => null, 'numberposts' => -1, 'exclude' => $thumb ); $attachments = get_posts( $args ); if ( $attachments ) { echo '<a href="'.esc_url( get_permalink() ).'"><div class="x-flexslider x-flexslider-featured-gallery man"><ul class="x-slides">'; foreach ( $attachments as $attachment ) { echo '<li class="x-slide">'; if ( $fullwidth ) { echo wp_get_attachment_image( $attachment->ID, 'entry-fullwidth', false, false ); } else { echo wp_get_attachment_image( $attachment->ID, 'entry', false, false ); } echo '</li>'; } echo '</ul></div></div>'; } }Hope that helps.
August 18, 2016 at 4:07 am #1136487
daviddunningtonParticipantThanks for the reply works perfectly just had to remove the last div tag to stop the layout been messed up.
The support is very impressive guys Thank You 🙂
August 18, 2016 at 4:43 am #1136534
Rue NelModeratorYou’re welcome! We’re happy to help you out.
If you need anything else we can help you with, don’t hesitate to open another thread. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1134933 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
