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

    when using enfold’s Avia builder in a RTL site
    the most left column of a page in the back end will be the the most right column in the front end – which is a very confusing
    because I have to work in reverse (that’s how i dealt with it so far)
    Is there a way to make it work normally (like it works in LTR english sites? e.g the most left column of a page in the back end will also be the the most left column in the front end)?
    to make the question more understandable please take a look in the links provided in the private content

    I’ve tried the solution mentioned in this thread https://kriesi.at/support/topic/rtl-sortedreverse-functions-problem/#post-384172
    but it seems to only effect mobile view and it also doesn’t work well when there are separators between the columns
    🤔

    • This topic was modified 2 years, 1 month ago by  Ismael.
    #885900

    Hey Doron,

    Thank you for using Enfold.

    The builder should render the rtl layout on the frontend correctly even though it doesn’t look that way on the backend. I’m sorry to say this but you’ll just have to use your imagination because this is going to require major modification in the theme and it might take a while before it’s implemented. Please hire a freelance developer or contact our partner, Codeable.

    but it seems to only effect mobile view and

    Regarding the custom script, please try to remove this part.

    (windowWidth < 767 && !sortedReverse) || 
    

    And replace the “wp_footer” hook with “admin_head”.

    Best regards,
    Ismael

    #885984

    Hey Ismael
    beside the reverse columns order, The builder does render the layout on the frontend correctly,
    I’ve changed the script according to your suggestion so it look like this:

    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)) {
    
                    var rtlContainer = $('.entry-content-wrapper'); 
    
                    rtlContainer.each(function(){
                    	var rtlCols = $(this).children('.flex_column').not('.av_one_full');
                    	$(this).append(rtlCols.get().reverse());
                    });
    
                    sortedReverse = !sortedReverse;
                }
            }, 100);
        }).trigger("resize");
    
    })(jQuery);
    
    </script>
    <?php
    }
    if(is_rtl()) { 
    	add_action('admin_head', 'rtl_columns_fix'); 
    }

    but now it seems it doesn’t have any effect at all (desktop or mobile view, frontend or backend, they all stayed the same)
    any way, for now I will try hiring a freelance as you suggested
    also, I will be most grateful if you inform kriesi about this RTL issue so hopefully he will fix it in future versions of Enfold
    thanks :)

    #886928

    Hi,

    Please replace the script with the following code.

    function rtl_columns_fix(){
    ?>
    <script>
    (function($){
        var resizeTimeout;
        $(window).resize(function () {
            if (resizeTimeout) {
                window.clearTimeout(resizeTimeout);
            }
            resizeTimeout = window.setTimeout(function () {
                var windowWidth = window.innerWidth;
                if ((windowWidth >= 767)) {
    
                    var rtlContainer = $('#aviaLayoutBuilder');
    
                    rtlContainer.each(function(){
                    	var rtlCols = $(this).children('.avia_layout_column').not('.av_one_full');
                    	$(this).append(rtlCols.get().reverse());
                    });
                }
            }, 100);
        }).trigger("resize");
    })(jQuery);
    </script>
    <?php
    }
    
    add_action('admin_head', 'rtl_columns_fix');

    Best regards,
    Ismael

    #886970

    Hi
    thank you so much for trying
    I replaced it with your code but it still doesn’t seem to have any effect at all
    do you want a login access?

    #887676

    Hi,

    Thank you for the update. It’s working on my installation. Please disable the cache and minify plugins if there’s any.

    Best regards,
    Ismael

    #887818

    beside a disabled Akismet there aren’t any plugin in this installation (so far)
    the site is hosted at wpengine but i Purged ALL caches
    I still can’t see any difference
    most left column of a page in the backend will be the the most right column in the frontend and so on
    ..may be i’m missing something?

    you are probably testing your code on a clean installation
    my installation is a modified child theme..could that be the reason?

    #888311

    Hi,

    It should work even in a child theme. Please post the login details in the private field. Make sure that the Appearance > Editor panel is accessible.

    Best regards,
    Ismael

    #888796

    Appearance > Editor panel is accessible.
    login details are in the private field
    thank you so much for looking into this matter 🙏

    #889453

    Hi,

    Thank you for the info.

    We replaced the script with the following hook.

    add_action('admin_head', 'rtl_columns_fix_css');
    function rtl_columns_fix_css() {
    	$output = "<style>.avia_layout_column, .avia_layout_section, .avia-highlight { float: right !important; }</style>";
    	echo $output;
    }
    

    Best regards,
    Ismael

    #889720

    WOW!
    it’s working!!
    thank you so much!
    you should tell kriesi to add this fix to all RTL users ( Arabic, Persian, Hebrew etc) they will all appreciate it very much
    thanks again and have a great week 😁

    #889880

    Hi,

    We’ll forward it to Kriesi. Thank you for using Enfold. :)

    Best regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Reverse columns order on RTL site’ is closed to new replies.