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

where do I find head file

<head> 

Q2A version: 1.8.3 the latest version

2 Answers

+1 vote
by

Admin>Layout

Custom HTML in <head> section of every page:

is not helping you ?

by
I knew this but Custom HTML in <head> section of every page) not helping  me

when I put Html code in it and save settings .the code disappears and the redirection occurs to my website domain
by
That's unrelated to Q2A. You have a server misconfiguration. Check with your hosting provider
by
Do you know How to find header file in Q2A?
by
Yes, I know.

What did the hosting say?
by
ok where I find it , not need to hosting?
+2 votes
by

1. Edit file qa-theme/<your-theme>/qa-theme.php

2. Add or merge the following function:

public function head_custom() {
    parent::head_custom();
    echo <<<HTML
<script>
your code here
</script>
HTML;
}

Anyway, as I said, your hosting provider should tell you why you can not upload <script> tags to their server. It's not really a Q2A issue.

by
No. There goes your code. Add the code in here and I'll show you. The <script> tags are also examples...
by
please tell me what the message I write to my hosting
by
thank you my friend so much, the code is working good
I put google analytical code inside qa-theme .php , it is working
 
If I put adsense code , will it be working?
by
+1
Yes, it will. Just add more script tags and that's it:

<script>[adsense]<script>
<script>[google analytics]<script>

By the way, there is no need to say "thanks". In a Q&A site you do that by accepting the answer :)
...