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

How can I add a reference to the title in the open question as to the site stackoverflow.com 

Title link

Q2A version: 1.6.1

3 Answers

+1 vote
by
selected by
 
Best answer

1. open qa-include/qa-app-format.php

2. find line 301:
     $fields['title']='<span class="entry-title">'.$fields['title'].'</span>';

3. change it to:
     $fields['title']='<a href="'.$fields['url'].'" class="entry-title">'.$fields['title'].'</a>';


I hoped it would be core...

+1 vote
by
by
Am I missing something? My question titles in question pages have always been links to themselves.
by
question title of this post is "How can I add a link to the questions in the title?". it's not linked to same page by default. this function makes it happen.
maybe you have a custom theme with this feature.
by
Thanks, but strangely it adds word "span" in link url...
by
my bad, $this->content['title'] is html code(title inside SPAN tag). I should have used $this->content['q_view']['raw']['title']. it's fixed now.
0 votes
by
Here are the steps:
 1. open qa-include/qa-app-format.php

2. find line 301:
     $fields['title']='<span class="entry-title">'.$fields['title'].'</span>';

3. change it to:
     $fields['title']='<a href="'.$fields['url'].'" class="entry-title">'.$fields['title'].'</a>';
...