Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ivchodev

    (@ivchodev)

    Yes, I understand. But i am sure its possible to do. Do you know how can i achieve that ?

    Yes, you can open your database -> select the options table -> and modify the fields ‘site_url’ and ‘home’ and you will be able to successfulyl log back in ??

    Thread Starter ivchodev

    (@ivchodev)

    Thanks for the nice response.

    Yes, i have the defaults for all slides in one section and the user can override them if they choose another setting for a specific slide ( they also update in the customizer ). I am giving them more flexibility, so they can do modifications per slide or if they want to do a fast setup – just setup the defaults for all slides.

    For example you are selling dresses and have a few diffrent banners in the slider, but on one of the pictures the model is right aligned on the picture and on other is left aligned. So, the user may want to position the call to action text and the ‘BUY’ button on diffrent places in diffrent slides. Also the banner may have color differences and you may want the texts in diffrent color on diffrent slides. Thats why i did it.

    But you have me a great idea tough, i think i am going to make the slider as a plugin which comes with the theme for free.

    Here is a little algorithm to remove the unnecessary classes from the element every time you type something into the form ^^ Use it inside the function you get the postMessage

    var class = to;
    
    for ( var i = class.length - 1; i > 0; i-- ) {
        var removeThisClass = class.substring(0,i);
        $('your_element_selector_here').removeClass(removeThisClass);
    }

    A working example would be:

    wp.customize( 'your_setting_id', function( value ) {
        value.bind( function( to ) {
    
            var class = to;
    
            $('your_element_selector_here').addClass(class);
    
            for ( var i = class.length - 1; i > 0; i-- ) {
                var removeThisClass = class.substring(0,i);
                $('your_element_selector_here').removeClass(removeThisClass);
            }
    
        } );
    });

    Cheers

    • This reply was modified 6 years, 9 months ago by ivchodev.
    • This reply was modified 6 years, 9 months ago by ivchodev.
    • This reply was modified 6 years, 9 months ago by ivchodev.
Viewing 4 replies - 1 through 4 (of 4 total)