Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #664529

    In the past I asked about incorrect section order in rtl mobile display:
    https://kriesi.at/support/topic/incorrect-section-order-in-rtl-mobile-display/

    You gave this solution:
    https://kriesi.at/support/topic/rtl-sortedreverse-functions-problem/

    But in updated version – it’s not working any more…

    #665074

    Hey yudkoren,

    Please post a link to your site.

    Best regards,
    Josue

    #665175

    Attached links

    #666024

    Hi,

    I don’t see the custom script anywhere in the page. Did you remove it? Please post the login details here so that we can check the functions.php file.

    Best regards,
    Ismael

    #666096

    Custom script switched not only right and left but also first and last.
    I removed it and now it’s only right and left switched.

    Login attached

    #667112

    Hi,

    Where did you add the “rtl_columns_fix” script? We may break the site if we add duplicate functions.

    Best regards,
    Ismael

    #667168

    As I wrote, I removed the script because it switched not only right and left but also first and last.
    But now it is back.
    In functions.php

    Please help

    #668054

    I have this site that is RTL and the mobile order is LTR
    How can we fix it, i also tried and insert the code into the function and it disrupt the order and gave me the upside from bottom to top site.
    https://kriesi.at/support/topic/rtl-sortedreverse-functions-problem/

    #668811

    Hi,

    Please update the code:

    function rtl_columns_fix(){
    ?>
    <script>
    (function($){
    
        var resizeTimeout, sortedReverse = false;
        $(window).resize(function () {
            if (resizeTimeout) {
                window.clearTimeout(resizeTimeout);
            }
            resizeTimeout = window.setTimeout(function () {
                var windowWidth = window.innerWidth;
                if ((windowWidth < 767 && !sortedReverse) || (windowWidth >= 767 && sortedReverse)) {
    
                    var rtlContainer = $('.entry-content-wrapper'),
    					rtlColsOdd   = rtlContainer.children('.flex_column:odd').not('.av_one_full'),
    					rtlColsEven  = rtlContainer.children('.flex_column:even').not('.av_one_full'),
    					cols		 = [];
    
    				cols = $.map(rtlColsOdd, function(v, i) { return [v, rtlColsEven[i]]; });
    
    				rtlContainer.each(function(){
    				   $(this).append(cols);
    			   });
    
                    sortedReverse = !sortedReverse;
                }
            }, 100);
        }).trigger("resize");
    
    })(jQuery);
    
    </script>
    <?php
    }
    if(is_rtl()) {
    	add_action('wp_footer', 'rtl_columns_fix');
    }

    NOTE: This is only going to work on two column layouts.

    Best regards,
    Ismael

    #668937

    Hi,
    it didn’t solve the problem.
    It still switching left-right and first-last

    Yud

    #669200

    Hi!

    You placed the code in the style.css file instead of the functions.php file. Please check it now.

    Best regards,
    Ismael

    #669280

    Working great.
    Thanks

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Incorrect Section Order in RTL Mobile Display’ is closed to new replies.