Tagged: x
-
AuthorPosts
-
August 8, 2016 at 11:18 am #1122311
BrownParticipantBefore I updated all of the X theme software, I had the portfolio images successfully set up to open in lightbox with custom functions.php in my child theme, and now they don’t. Any help to get it working again is much appreciated. See example here of images no longer opening in lightbox: http://www.milestoneengcon.com/projects/south-cove-recreation-building/
This was the custom functions code provided by x-theme support:
add_action(‘wp_footer’, ‘enqueue_lightbox_script’);
function enqueue_lightbox_script() {
echo ‘<script type=”text/javascript” src=”‘ . home_url() . ‘/wp-content/plugins/x-shortcodes/js/dist/site/vendor-ilightbox.min.js”></script> <script> jQuery(document).ready(function(){jQuery(“.gallery-icon a”).iLightBox({skin: “light”,linkId: “gallery-image”,overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: “horizontal”,controls: {thumbnail: false}});}); </script>’;}
August 8, 2016 at 11:59 am #1122381
ChristianModeratorHey there,
Please try changing
wp-content/plugins/x-shortcodes/js/dist/site/vendor-ilightbox.min.jsto
wp-content/plugins/cornerstone/assets/dist/js/site/vendor-ilightbox.min.jsThanks.
August 8, 2016 at 12:49 pm #1122473
BrownParticipantThanks, but that didn’t seem to do the trick. I am not using Cornerstone on the Portfolio pages.
This is the code now:
// Lightbox Script for Portfolio Single Items Galleryadd_action(‘wp_footer’, ‘enqueue_lightbox_script’);
function enqueue_lightbox_script() {
echo ‘<script type=”text/javascript” src=”‘ . home_url() . ‘/wp-content/plugins/cornerstone/assets/dist/js/site/vendor-ilightbox.min.js”></script> <script> jQuery(document).ready(function(){jQuery(“.gallery-icon a”).iLightBox({skin: “light”,linkId: “gallery-image”,overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: “horizontal”,controls: {thumbnail: false}});}); </script>’;}
August 8, 2016 at 4:55 pm #1122798
FriechModeratorHi There,
Please do a shortcode instead;
add_action('wp_footer', 'enqueue_lightbox_script'); function enqueue_lightbox_script() { echo do_shortcode( '[lightbox selector=".gallery-icon a" deeplink="true" opacity="0.875" prev_scale="0.75" prev_opacity="0.75" next_scale="0.75" next_opacity="0.75" orientation="horizontal" thumbnails="false"]' ); }If that does not work, try to reinstall your Cornerstone. As the lightbox javascript file on your site can not be found.
Let us know how it goes.
Thanks.
August 9, 2016 at 8:41 am #1123676
BrownParticipantThank you very much, now works fine.
August 9, 2016 at 9:54 am #1123800
RahulModeratorGlad that worked for you.
If you still have any issues with the theme, let us know. We’d be happy to assist you with everything.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1122311 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>

