Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by

I want to change the default 'blue' site title text to white. Can anyone tell me how to do that please?

Additionally, is it at all possible to assign two colours to get something like Red&Red on that same line??

Q2A version: 1.7.1
What theme are you using? A screenshot would help :) BTW, 1.7.1 has not been released yet :P so I guess you're using the current dev branch.
Hi pupi

I can't do a screenshot from here however...

The Admin>General tabs, show an option to add a site title name, effectively where the logo is on here. By default, the inputted text is blue and I'd like to change it to white (or second option in my original question)

P.S. Yes, I'm using the dev branch. Sorry for the confusion.

1 Answer

+2 votes
selected by
Best answer

You haven't mentioned the theme you're using but considering you've mentioned a "blue" title I have to assume it is Snow. In order to mix colors in the title you'll have to override that variable you're setting on the admin/general section. This is because you need to add HTML and the core removes HTML from it.

So you should go to your qa-theme.php file and add this behavior:

public function initialize() {
    $this->content['logo'] = sprintf('
        <a href="%s" class="qa-logo-link">
            <span style="color:red">
            <span style="color:yellow">
    ', qa_path_html(''));
    return parent::initialize();

I think it is clear enough how to change the color of the texts by reading the HTML and seeing its output:

Excellent... Thanks a million @pupi

I was indeed referring to the snow theme.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.