Your address will show here +12 34 56 78

Home Forums General topics for our real estate themes how to disable pretty photo

This topic contains 2 replies, has 2 voices, and was last updated by  sananhung_bds 2 years, 2 months ago.

  • Author
    Posts
  • #50559

    creremAnna

    To disable prettyphoto plugin you need to do the following

    1. in libs/css_js_include.php you need to remove this line (around line 93)

    wp_enqueue_script(‘jquery.prettyphoto’, get_template_directory_uri().’/js/jquery.prettyphoto.js’,array(‘jquery’), ‘1.0’, true);

    2 in js/control.js you need to remove these lines of code (starting with line 694)

    $(“a[rel^=’prettyPhoto’]”).prettyPhoto();
    var mediaQuery = ‘has_pretty_photo’;
    if (Modernizr.mq(‘only screen and (max-width: 600px)’) || Modernizr.mq(‘only screen and (max-height: 520px)’)) {
    mediaQuery = ‘no_pretty_photo’;
    //$(“a[data-pretty^=’prettyPhoto’]”).unbind(‘click’);
    $(“a[rel^=’prettyPhoto’]”).unbind(‘click’);
    }

    // pretty photo on / off
    mediaQuery = ‘has_pretty_photo’;

    if ((Modernizr.mq(‘only screen and (max-width: 600px)’) || Modernizr.mq(‘only screen and (max-height: 520px)’)) && mediaQuery === ‘has_pretty_photo’) {
    // jQuery(“a[data-pretty=’prettyPhoto’]”).unbind(‘click’);
    jQuery(“a[rel^=’prettyPhoto’]”).unbind(‘click’);
    mediaQuery = ‘no_pretty_photo’;
    } else if (!Modernizr.mq(‘only screen and (max-width: 600px)’) && !Modernizr.mq(‘only screen and (max-height: 520px)’) && mediaQuery === ‘no_pretty_photo’) {
    //$(“a[data-pretty=’prettyPhoto’]”).prettyPhoto();
    $(“a[rel^=’prettyPhoto’]”).prettyPhoto();
    mediaQuery = ‘has_pretty_photo’;
    }

    Now photos open in a new page when you click on them (this is wordpress images behavior). To remove the link would require to remove urls in html

    The templates for slider in wpresidence are

    templates/listingslider-vertical.php

    and

    templates/listingslider.php

    • This topic was modified 3 years, 2 months ago by  Anna.
    • This topic was modified 2 years, 4 months ago by  Anna.
  • #50676

    QantumThemes

    Excellent answer, excellent customer support, thanks!

  • #119872

    sananhung_bds
    Participant

    yes. i like pretty photo. it is easy use

You must be logged in to reply to this topic.