![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
-
AuthorPosts
-
December 5, 2017 at 12:25 pm #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 contentI’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 6 years, 8 months ago by
Ismael.
December 7, 2017 at 4:48 am #885900Hey 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,
IsmaelDecember 7, 2017 at 9:44 am #885984Hey 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 :)December 9, 2017 at 6:04 pm #886928Hi,
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,
IsmaelDecember 9, 2017 at 8:47 pm #886970Hi
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?December 12, 2017 at 3:12 am #887676Hi,
Thank you for the update. It’s working on my installation. Please disable the cache and minify plugins if there’s any.
Best regards,
IsmaelDecember 12, 2017 at 11:09 am #887818beside 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?December 13, 2017 at 1:17 pm #888311Hi,
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,
IsmaelDecember 14, 2017 at 9:57 am #888796Appearance > Editor panel is accessible.
login details are in the private field
thank you so much for looking into this matter 🙏December 16, 2017 at 3:28 am #889453Hi,
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,
IsmaelDecember 17, 2017 at 12:16 am #889720WOW!
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 😁December 18, 2017 at 2:07 am #889880 -
This topic was modified 6 years, 8 months ago by
-
AuthorPosts
- The topic ‘Reverse columns order on RTL site’ is closed to new replies.