Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
1.4k views
in Q2A Core by

Is it possible to have child theme in the next versions of q2a? Just like what wordpress do.

 A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme

There are a few reasons why you would want to use a child theme:

  • If you modify a theme directly and it is updated, then your modifications may be lost. By using a child theme you will ensure that your modifications are preserved.

Read more here

Q2A version: 1.8

1 Answer

+3 votes
by
selected by
 
Best answer
That exists in Q2A as a layer: http://docs.question2answer.org/plugins/layers

Add your theme changes to a plugin with a layer and they will survive the changes in your theme. The interface is exactly the same as a theme class as it (literally) extends the base theme too.
by
Thank you Pupi for your answer.
But maybe it would be better to have a provided plugin  with official release of q2a?
by
So you mean to include the boilerplate of the plugin which includes an empty layer? I don't think that will save much time (the time it takes to write a line as you can see here: http://docs.question2answer.org/plugins/#registering-layers).
by
Okay thank you Pupi, I created the plugin and it works fine for me:)
Thank you again.
by
just another question: is there any issue using this plugin to change the css? does using layer plugin slow the site speed?
by
No issue with applying CSS in a layer. It doesn't slow site speed by itself.
by
by
@pupi1985
It seems that this method doesn't change the css for some elements except when using !important.
by
If what you said was correct then all plugins should be styling using "!important" and that is not the case.

That is a CSS issue rather than a "method" issue. Q2A allows you to output CSS then you need to output and style the CSS properly.
by
Hi Pupi.
Could you please let me know if the textareas in q2a has a limit of characters or not?
by
I can't remember any that has a limit. However, bear in mind each field in a database that stores a value HAS a limit so you might get an error that you're exceeding the field's length. Anyway, I think you should ask a different question for that rather than asking a question in a comment :)
by
Thank you pupi. you are right:)
...