Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM Price Slider steps customization

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

  • Author
    Posts
  • #101497

    Gabriel
    Participant

    Hi,

    Is there a way to change the price slider steps ?

    For exemple, my slider is set from $0 to $5.000.000 : I don’t to be able to change the price with $1 steps. $100.000 steps would be clearly more interesting.

    Thanks a lot.

    ANSWER:

    Hi,

    You just need to add in 4 places for all the 4 instances (mobile, search, widget, shortcode)

    step: 100

    to slider_price

    in control.js (line ~276 , ~ line 302, ~line 322 and line ~339 )

    For control.js – path is wpresidence/js/control.js

    Your new code should be something like

     $( "#slider_price_mobile" ).slider({
            range: true,
            min: parseFloat(control_vars.slider_min),
            max: parseFloat(control_vars.slider_max),
    	step:100,
        ////////////////////////////////////////////////////////////////////////////
        /// slider price 
        ////////////////////////////////////////////////////////////////////////////
        
     
        $( "#slider_price" ).slider({
            range: true,
            min: parseFloat(control_vars.slider_min),
            max: parseFloat(control_vars.slider_max),
    		step:100,

    Thanks

    • This topic was modified 2 years, 6 months ago by  Anna.
    • This topic was modified 2 years, 3 months ago by  Anna.
    • This topic was modified 2 years, 3 months ago by  Anna.
  • #102002

    Anna
    Keymaster

    Hi,

    You just need to add in 4 places for all the 4 instances (mobile, search, widget, shortcode)

    step: 100

    to slider_price

    in control.js (line ~276 , ~ line 302, ~line 322 and line ~339 )

    For control.js – path is wpresidence/js/control.js

    Your new code should be something like

     $( "#slider_price_mobile" ).slider({
            range: true,
            min: parseFloat(control_vars.slider_min),
            max: parseFloat(control_vars.slider_max),
    	step:100,

    Thanks

  • #102047

    Gabriel
    Participant

    Thanks Anna !

  • #104266

    ballyb
    Participant

    Hi,

    New to the site. Could you let me know which .php file i need to access to make the same change?

    Thanks,

    Chris

  • #113430

    Anna
    Keymaster

    Hi Chris

    This is done only in JS.

    Thank you
    Anna

You must be logged in to reply to this topic.