Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
2.3k views
in Q2A Core by
I want to insert a 468 Adsense banner between the question text and the tags. Without delving into learning how to make custom/advance themes, can I modify the existing qa-theme-base.php file to include my adsense code? I've looked over the code in the qa-theme-base file but I am lost on where (line #?) or how to implement the custom html/adsense. I've seen a number of users post this type of question but have not found an answer other than "see advanced themes". Thanks in advance :)
Q2A version: 1.5

2 Answers

0 votes
by

Ok. I got it. Open includes/qa-theme-base.php and go down find see code under function q_view_main($q_view) on or around line # 1672. I wanted to put the adsense banner direcly below the question text/content and before the tags. So I inserted a new line $this->output('<p>my adsense code</p>'); right under the line that says $this->q_view_content($q_view);   . It worked great. Now I'll probably go about learning how to implement this using advanced themes by creating a custom q_view_main($q_view) function to override the default code. Any tips/example for newbies for creating function overrides would be appreciated from more experienced users. Thanks.

by
You ought to use a custom theme for that since when you update Q2A your changes will be overridden. It's very easy to do, just create qa-theme.php and copy the function from qa-theme-base.php.
+1 vote
by

Best choose for you is use Widget Anywhere You can add anything in anywhere. :)

by
Widget Anywhere is ok, but it uses mysql queries.
...