• Hello,

    Apologies, I’ve ended up with another issue..

    I have used some code to enable my slider carousel to link to the page by clicking the picture – but in doing so, the shadow around the slider is now too big – despite being fine before. Obviously I could make the image longer, but I am trying to avoid that..

    Currently using this code;

    .carousel-inner {
    top:20px;
    box-shadow: 0px 0px 5px 2px #000000;
    
    }

    and (in functions.php)

    add_action('wp_head' , 'link_whole_slide');
    function link_whole_slide() {
       //sets the slider image link
       add_filter('tc_slide_background' , 'my_slide_link', 10, 3);
        function my_slide_link( $slide_image , $slide_link, $attachment_id) {
            //sets the slider image link
            return sprintf('<a href="%1$s" title="%2$s">%3$s</a>',
                $slide_link,
                get_the_title($attachment_id), //will use the title of the picture on mouse hovering
                $slide_image
            );
        }
        //wraps the slider caption in the same link as the call to action button
        ?>
        <script type="text/javascript">
            jQuery(document).ready(function () {
                ! function ($) {
                    //prevents js conflicts
                    "use strict";
    
                    $( '.carousel-caption' ).each(function( index ) {
                      var link = $( this ).parent().find('a').attr('href');
                      $(this).wrap('<a href="'+link+'"></a>');
                    });
                }(window.jQuery)
            });
        </script>
        <?php
    }

    Thanks again, and Merry Christmas.

    P.S. website is russinternational.org

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Carousel Shadow’ is closed to new replies.