- This topic has 12 replies, 2 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
December 6, 2022 at 3:35 am #2451313
Monya
Hi,
If my whole website is in English (LTR) and I would like to have one page only inside that page to be in Arabic (RTL), is it possible?
December 6, 2022 at 5:46 am #2451407David
StaffCustomer SupportHi there,
try adding this CSS to your site:
.page-id-2759 #page { direction: rtl; }Note its uses the
page-id-*body class to target just that page.
And i assumed only the page content should be changed so we target the#pagecontainer to do that,January 2, 2023 at 3:24 am #2480388Monya
Hi,
If my whole website is in English (LTR), and I have a page called News
some posts are in English (LTR) and other posts are in Arabic (RTL)
How can I target the Arabic post and force it to stare from (RTL)?
January 2, 2023 at 5:51 am #2480560David
StaffCustomer SupportWe would need to target the specific posts in the loop to do that.
Is it possible to add a Tag to the posts that are written in Arabic ? Then that tag could be used to style those posts.January 2, 2023 at 10:54 pm #2481473Monya
If the tag is the only option that can fix it, then I have to do that
could you please guide me on how to style the post using tags?
January 3, 2023 at 2:23 am #2481603Monya
Also I have an other question
If I have a post in English (LTR)
That post have 2 paragraphs, one in English (LTR) and the other one in Arabic (RTL)
Can I change the style of each paragraph then one can start from LTR and the other one from RTL in the same post?
January 3, 2023 at 3:23 am #2481715David
StaffCustomer SupportIn WP there is the
post_classfunction which adds classes to the postarticleHTML element. Which applies to archives and single posts. Post classes include some meta about that specific post including classes that show the post taxonomies.The class syntax they use are like so:
Categories:
category-{term-slug}
Tags:tag-{term-slug}1. If you add a tag or
rtlto any post that is 100% RTL language. It will have thetag-rtlclass
NOTE this will only apply to Posts ( not pages )
2. For your paragraph of text, in the editor, select the Text block, and in Advanced > Additional CSS class(es) add:rtl
3. Change the above CSS to:.page-id-2759 #page, .tag-rtl, .rtl { direction: rtl; }If you intend to have many pages that are to be 100% RTL it is possible to enable Tags on pages.
January 3, 2023 at 3:54 am #2481777Monya
I am sorry, but it didn’t work with me, maybe because I am new to WordPress
Is there a document tutorial with screenshot or a video tutorial that could help me?
January 3, 2023 at 4:05 am #2481786David
StaffCustomer SupportOk, so lets take it one at a time 🙂
1. Adding the
rtltog to your post. First edit the post then see here:https://www.screencast.com/t/eS6gBmvf2t8w
2. Add a class to the text block. Select the text block and see here:
https://www.screencast.com/t/BOq2lvbrzhv
3. Then go to the Customizer > Additional CSS and paste in this CSS:
.page-id-2759 #page, .tag-rtl, .rtl { direction: rtl; }January 3, 2023 at 4:13 am #2481798Monya
Thank you so much for your help, it is working now ^_^
my last question,
.page-id-2759
the number 2759, can I use it for all my posts inside the news page?
January 3, 2023 at 4:32 am #2481845David
StaffCustomer SupportSo
.page-id-2759 #page,was to style the original page you wanted to make RTL it only affects that page.January 3, 2023 at 5:24 am #2481968Monya
Well noted with thanks ^_^
January 3, 2023 at 9:09 am #2482405David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.