Creating new theme


#1

Hi!

I would like to create a new book theme (right to left).
I wonder if i can create it from scratch, or I must inherit the McLuhan theme?

If i can create it by myself, what are the required files that should be in the new theme?

Thank you,
Etna


#2

You must inherit the McLuhan theme. You can use this cli command: https://github.com/pressbooks/pb-cli#wp-scaffold-book-theme if you have WP-CLI installed.


#3

Thank you so much!!
I really appreciate your help!


#4

Hi again! :sweat_smile:

I saw that McLuhan theme supports left-to-right.
I have to make my theme fully support right-to-left

Can you please guide me how I should do that? what changes I have to make, and where…

Thank you!


#5

Hi, I don’t really have expertise in RTL languages/scripts so I’m afraid I won’t be much help with this. You can add support for different languages and scripts using the Global Theme Options (see here: https://guide.pressbooks.com/chapter/appearance/) but that may not be sufficient. Sorry I can’t provide any further information.


#6

Hi, thanks for your fast response!

I will learn more about right-to-left support.
Would it be an option to create the theme from scratch? or I still must inherit McLuhan?

Thanks!


#7

You must inherit McLuhan because it provides all of the web interface and base styles for various book export formats.


#8

Really appreciate all your help! :smiley: