Problem of adding javascript in Q2A

Post date: 2019-11-16 00:56:36
Views: 123

Hello everybody!

I have a question to ask your opinion.

I am struggling with this from quite some time but cannot find any soltion. I have a really long blog-type post with lots of paragraphs that I have added as a question in my Question2Answer website.

 I would like to put adsense code after let's say the 3rd paragraph, but there is no way to do it without modifying the php code. I read the Q2A documentation and from what i understood, i need to change the qa_view function. This is the original code for displaying question content in qa-theme.php:

public function q_view_content($q_view)

{

    $content = isset($q_view'content']) ? $q_view'content'] : '';

    $this->output('<div class="qa-q-view-content">');

    $this->output_raw($content);

    $this->output('</div>');

}

However, I have no idea how to add the javascipt code here and to refer it to specific post id. I was thinking about adding wrapper div after a specific paragraph, but i do not know how to accomplish this, since I am very new with php. Any help will be much appreciated.

Thank's a lot!

Please click Here to read the full story.
 
Other Top and Latest Questions:
3 Body Problem: Countdown
Movie: The American Society of Magical Negroes
Seattle-area Radon mitigation recommendations?
Movie: Knox Goes Away
Movable stationary bicycle
Turn off notification for award?
Hazbin Hotel: Hello Rosie
Frieren: Beyond Journey's End: Frieren The Slayer
Trustworthy way to send PDF as a FAX on a Mac?
Dog personality changes on prednisone