Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter alin.ticlea

    (@alinticlea)

    Thank you for the hint.

    I managed to solve the problem in a different way:
    – for each option in $this -> footer_widgets I added a field called “language” with value set to “en_en” or “fr_fr”.
    – in /parts/class-footer_main.php I just removed the widgets that were not matching the the_curlang()

    foreach ( $footer_widgets as $key => $area ) {
        	  $status = is_active_sidebar( $key ) ? true : $status;
    	 if ($footer_widgets[$key]["language"] != the_curlang()) unset($footer_widgets[$key]);
        	}

    Worked like a charm …

    A better solution would have been to load just the widgets that match the_curlang() but I am really pressed for time and I can not dig dipper into this …

    All the above changes were made under the child theme.

    Thank you.

    Thread Starter alin.ticlea

    (@alinticlea)

    I made that change on Customizr 3.0.9

    I intend to update the site that is using this theme to WP 3.8 and Customizr 3.1.5

    I will post the changes here in the first week of January.

    Thread Starter alin.ticlea

    (@alinticlea)

    Finally I got it working. Here is the dev site where I used the code:
    https://osansoft.com/lilotfruits/

    Here are the code changes:
    – under [your_site]/wp-content/themes/customizr/inc/css/[style_that_you_use].css
    add:

    .carousel-navigation  {
      top: 425px;
      left: 525px;
      position: absolute;
      z-index: 999;
      width: 230px;
    }
    
    .carousel-selection  {
      background: url('circle_grey.png') no-repeat;
      width: 32px;
      height: 32px;
      display: block;
      float: left;
    }
    
    .active {
      background: url('circle_blue.png') no-repeat;
    }

    – add in the same folder circle_grey.png and circle_blue.png. I got mine from: https://findicons.com/

    – under under [your_site]/wp-content/themes/customizr/parts/class-header-slider.php
    add:

    <?php
                      $count = 1;
                      $path = get_stylesheet_directory_uri();
                      foreach ( $slides as $s) {
                        $slide_object   = get_post( $s);
                        if (!isset ( $slide_object)) {
                          continue;
                        }
                        if ($count == 1) {
                          $html = "<a id=\"$count\" href=\"#customizr-slider\" data-slide-to=\"$count\" class=\"carousel-selection active\"></a>";
                        } else {
                          $html = "<a id=\"$count\" href=\"#customizr-slider\" data-slide-to=\"$count\" class=\"carousel-selection\"></a>";
                        }
                        echo $html;
                        $count ++;
                      }
                    ?>
                  </div>

    right after <div class="carousel-navigation">
    Also add:

    //click on button
                    $('.carousel-navigation > a').click(function(){
                      var item = Number($(this).attr('id'));
                      $('#customizr-slider').carousel(item - 1);
                      $('.carousel-navigation .active').removeClass('active');
                      var item = $('#customizr-slider .item.active').index();
                      $('.carousel-navigation a:eq('+ item + ')').addClass('active');
                      return false;
                    });
    
                    //change image on next/prev - before animation
                    $('#customizr-slider').bind('slid', function() {
                      $('.carousel-navigation .active').removeClass('active');
                      var idx = $('#customizr-slider .item.active').index();
                      $('.carousel-navigation a:eq(' + idx + ')').addClass('active');
                    });

    right after: $( '#customizr-slider' ).carousel(<?php echo $delay; ?>);

    I have not tested the code with more than 5 slides. I think it would be a good idea to add a limit of 5 images per slide in the theme, as per recommendation from the link from my initial post.

    If you find this code useful please feel free to incorporate it into the theme.

    Thank you.

    Alin

Viewing 3 replies - 1 through 3 (of 3 total)