Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

How to link answer count to question page?

0 votes
Hello,

Is there a way to link the numbrs in the answer count on the front page to the single post/question page? So when a user sees that a post has a certain amount of answers they can click on it and it takes them to the answers of that question? Thanks!

Z
asked Feb 17, 2011 in Q2A Core by zea

1 Answer

0 votes

Yes but not completely straightforward. There is no generic ID on the answers as a whole so you can add that then link to that anchor.

First check up advanced themes if you haven't already: http://www.question2answer.org/advanced.php#theme-advanced then try this:

1. Find where the "qa-a-list" element is output and change it to <div class="qa-a-list" id="qa-answers">

2. Find the part which links the title to the question page and make a note of the code there.

3. Find which function outputs the answer count and add your link to the question, but put #qa-answers on the end. You'll also need to check the number of answers I guess to avoid linking "0 answers".

 

PS. Sorry if this is a bit vague as I don't have the Q2A code on the computer I'm using but I can add more details later if you need.

answered Feb 18, 2011 by DisgruntledGoat