-
AuthorPosts
-
April 17, 2018 at 4:12 pm #943150
Hi there,
Is their a way when you hover on a portfolio item in a portfolio grid, that you see the caption text and not the standard arrow?
In the settings of the item I filled in the caption and in the preview I see it working. But in the portfolio grid it won’t work. It’s always the arrow.How can I achieve this?
April 19, 2018 at 8:14 am #943958Hey Pieter,
Thank you for using Enfold.
You can only display the excerpt and title under the preview image by default. If you want the grid content to display over the image, try this css code.
.grid-content { position: absolute; top: 0; left: 0; opacity: 0; height: 100%; width: 100%; padding: 20px; -webkit-transition: opacity 0.4s ease-in-out; -moz-transition: opacity 0.4s ease-in-out; transition: opacity 0.4s ease-in-out; } .grid-entry:hover .grid-content { opacity: 1; } .grid-entry .image-overlay { display: none !important; }
Best regards,
IsmaelApril 19, 2018 at 9:52 am #943990Hi Ismael,
Thanks this works indeed.
But now is the link gone to show the item in a lightbox?Kind regards,
VincentApril 22, 2018 at 12:47 am #944990Hi,
Thank you for the update. Please add this script in the functions.php file to trigger the grid entry link when you click on the grid content container.
add_action('wp_footer', 'ava_custom_script_trigger_grid_entry'); function ava_custom_script_trigger_grid_entry(){ ?> <script type="text/javascript"> (function($) { function a() { $('.grid-content').on('click', function() { $(this).trigger('av_trigger_grid_image_lightbox'); }); $('.grid-content').on('av_trigger_grid_image_lightbox', function() { $(this).prev('.grid-image').trigger('click'); }); } a(); })(jQuery); </script> <?php }
Best regards,
IsmaelApril 22, 2018 at 2:42 pm #945037Hi Ismael,
The previous code about the caption overlay won’t work anymore after an update to the newest Enfold and WordPress version.
How could I achieve this again in the newest version?
Is something changed in the naming of the grid elements?
The caption is now shown underneath the picture again. But with the correct background opacity etc.
I’m thinking this has something to do with the position relative and absolute style in the parent element.Kind regards,
Vincent- This reply was modified 6 years, 7 months ago by Studio55.
April 23, 2018 at 5:44 am #945238Hi,
Where did you add the css modification? Please add it in the Quick CSS field. Or provide the login details in the private field so we could test the modifications.
Best regards,
IsmaelApril 23, 2018 at 8:25 am #945290Hi Ismael,
I have add it to the Quick CSS field. It worked fine before the update.
Kind regards,
VincentApril 24, 2018 at 8:32 am #945732Hi,
Thank you for the update.
It was being overridden by another css declaration from the minified css generated by autoptimize. We set an !important rule to the css modifications. You won’t be needing the plugin anymore because the theme has its own minification or compression feature now.
Best regards,
IsmaelApril 24, 2018 at 9:20 am #945761Hi Ismael,
Thanks!
If I add the code to functions.php the clicking event still won’t work.
Any thoughts?Kind regards,
VincentApril 25, 2018 at 5:42 am #946386Hi,
We modified the script and added a few css codes. It should work now.
Best regards,
IsmaelApril 25, 2018 at 8:24 am #946431Hi Ismael,
Thanks. The click event works now. But it’s not opening the image in a lightbox but in a separate page.
Is this not possible?Kind regards,
VincentApril 26, 2018 at 11:46 am #947214Hi,
We adjusted the script again. It should trigger the lightbox now. :)
Best regards,
IsmaelApril 26, 2018 at 11:56 am #947220Hi,
This is just perfect!
Many thanks for the help!Kind regards,
VincentApril 30, 2018 at 7:15 am #948809Hi,
Awesome! -Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)Best regards,
Ismael -
AuthorPosts
- The topic ‘Portfolio item caption in portfolio grid’ is closed to new replies.