Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1132475

    Hi, Could you please assist with how to get the accordion slider to display the caption text below the image when the viewer clicks on one of the slides to enlarge? We have detailed diagrams and the viewers want to click on a slide to see it enlarged, then use the direction arrows to move through the rest of the slides. I would like the captions to appear below each slide in this “expanded view”. This would be similar to an image gallery in a portfolio where when you click on a particular slide, you get an enlarged view with caption below, that you can click through.

    Thank you kindly for your assistance.

    #1133932

    Hey ezdginc2017,

    Thank you for the inquiry.

    We can set the excerpt as the value of the accordion’s title attribute. Try this code in the functions.php file:

    add_action('wp_footer', function() {
    	?>
    	<script>
    		(function($) {
    			$(document).ready(function() {
    				$('.aviaccordion-slide').each( function() {
    					var link = $(this).find('.aviaccordion-slide-link');
    					var caption = $(this).find('.aviaccordion-excerpt p');
    
    					link.attr('title', caption.text());
    				});
    			});
    		})(jQuery);
    	</script>
    	<?php
    });
    

    Let us know if it it helps.

    Best regards,
    Ismael

    #1134596

    Hi Ismael,

    Yes, it worked! thank you so much! I put your code right at the bottom of the functions.php file.

    I have another question and I am sorry I can’t find where to post a new support question, so I’ll ask here.

    How do I have each portfolio item have its own distinct url? Right now, the url goes out to portfolio/category, but then all the items in the category share the same url for that category. I am using the Ajax portfolio.

    Thank you Ismael!

    #1135207

    Hi,

    Thanks for the update. Each portfolio item has its unique URL, but you have to click into. The URL of your first item is in private for instance.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.