Archived topic
Opposite Order of Menus in the Left Side of Navigation in RTL
13 replies · Started by Daniel on March 6, 2020
Hi my Friend, Tom
How are you today?
There is a problem in RTL sites with GP
For all of left side Navigation settings, The order of Navigation Menus is opposite
(In RTL sites) When Navigation is on the Right Side, Everything is OK (The Direction is from Right to Left -> It is Correct)
But
When Navigation is on the Left Side, The order of menus is opposite (The Direction is from Left to Right -> That is incorrect)
Please take a look at this screenshot: https://snipboard.io/gsJHFC.jpg
In the screenshot, the primary Navigation is on the Left side and unfortunately the direction (order) of menu items is opposite !!! (It should have been from right to left)
There is this problem For all of Navigation settings (Primary and Secondary and the case "use Navigation as Header")
I hope I would not make you sad. But I think this issue must be fixed for RTL websites in GP.
Thank you so much for your reply in advance
Have great day ahead
Hi there,
This looks like a bug we need to fix. Any chance you can link me to the site so I can take a look?
Let me know :)
Hi again
Thanks a lot for your reply
Please Take a look at this site: https://udp.aratip.com/
Secondary Navigation is on the left and menu order is opposite
Primary Navigation is on the right and menu order is (from right to left) correct
Thank you
Does this help?:
@media (min-width: 769px) {
.secondary-menu,
.main-navigation .menu {
display: flex;
justify-content: flex-end;
}
}
Dear Tom
Hello again
Thanks a lot for your support
Yeeeees, It works very well (But just for Secondary-menu)
Kindly, As I said before, This problem is both for secondary and Primary (https://snipboard.io/gsJHFC.jpg)
What should I add to this code to fix primary-menu too??
CSS adjusted: https://generatepress.com/forums/topic/opposite-order-of-menus-in-the-left-side-of-navigation-in-rtl/#post-1188290
Let me know :)
Fantastic :)
The code works perfect
Just one more thing
Your Support is Perfectly Great
All the Best
Thank you! :)
Hello again Tom
I'm sorry, If I'm bothering you
But unfortunately, When I use this code {https://generatepress.com/forums/topic/opposite-order-of-menus-in-the-left-side-of-navigation-in-rtl/#post-1188290} Navigation alignment stop working!! and the navigation stick to the left side as a result it doesn't come to the right or center !
What Should I do?
That CSS is specifically for moving the items to the left. We'll need to change it up if you want to change that - where would you like them to align?
Hi again
Thanks for your reply
Some of my customers need to have a site with align right, some of them align left
But It seems there is a bug in GP customize settings (For RTL sites)
Because (If I use this code) there will not be dynamic settings so that I can change them to right or left with customize settings. In this situation I will have to add this code every time. and I will have to change my child-theme every time. It's not interesting !
The customize settings have a bug (in RTL sites) needs to be fixed
Is these any way or any code so that I can add it to the child theme to fix the dynamic settings of GP forever?
(I've tried to fix it by my self by changing the float attribute in css. but in GP the direction of header items change with float. They don't change with attribute direction ltr or rtl)
(In RTL sites the direction of items must be from right to left whether navigation is in the right side or in the left side)
Thank you
I agree that it's a bug that needs to be fixed, but updates don't happen instantly, unfortunately.
You could try this CSS, instead:
@media (min-width: 769px) {
.secondary-nav-aligned-left .secondary-menu,
.nav-aligned-left .main-navigation .menu {
display: flex;
justify-content: flex-end;
}
}
That will apply the fix only when the navigation is set to left align.
It was exactly the code that I needed :) :)
I added it to the rtl.css of child-theme and GP settings are working completely correct now
There are no problems now
I really really appreciate it
Thanks a million
I wish you All the Best
Have a very great future whit this amazing theme "GeneratePress"
I will definitely continue working with GP :)
Awesome, glad it helped! :)