This topic has 4 replies, 2 voices, and was last updated 11 years by SQadmin.

  • Author
  • #4640
     kmb40
    Participant

    I create a page that contains images and text. When an image is clicked, there is no Lightbox effect.
    The user is redirected to a new window with a fullsize version of the image.
    Though the lightbox works in other parts of the site, such as profile albums.
    How do I correct this?

    #4802
     SQadmin
    Keymaster

    Hi,
    You can add this functionality for all links inside a page or post by putting this code in footer.php, somewhere before the wp_footer() line:

    COPY CODE
    
    <script>
    jQuery(document).ready(function() {
    	jQuery(".article-content a").prettyPhoto();
    });
    </script>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #4961
     kmb40
    Participant

    That resolved the issue. Thanks.

    #5295
     kmb40
    Participant

    Spoke too soon. This does fix this issue but causes another.

    Which is that standard url links placed in post / pages, when clicked, attempts to open a light box and then returns an image cannot be found error.

    #5321
     SQadmin
    Keymaster

    Yes you are right. This addresses only the images

    COPY CODE
    
    <script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery(".article-content a[href$='.jpg'], .article-content a[href$='.gif'], .article-content a[href$='.png']").prettyPhoto();
    });
    </script>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?