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

Hello everyone,

I am developping a new Q2A and I get some problems during theme optimisation.

My theme automatically add "Related question" under post. In "Viewing", I manage to make 10 Maximum related question, but couldn't choose where.

Then, how to get only 5 links under post question, but 10 related links (in sidebar widget) as the same time?

 

by
I cannot understand your question. Is your theme default theme (Snow / Classic / Candy) of Q2A?
by
edited by
Hi Sama, none of them actually, an other one, but I made a mistake, it's not link to my theme, because all theme can call "related question" through LAYOUT => Current active widget => and then in different places.

Then, I call on one below content (below question post), and an other in the sidebar. Problem  : I would like to call only 5 below content, and 10 in sidebar. You see?
by
I see. This widget displays questions according to one setting (Admin > Viewing > Maximum related questions). Therefore you cannot change display count depending on display position. Your hope will come true by making new plugin in imitation of this plugin.
by
Alright thank you Sama; And do you know how to remove all sidebar titles? => http://www.question2answer.org/qa/30433/how-to-remove-all-sidebar-titles

2 Answers

0 votes
by
selected by
 
Best answer

Hack example of qa-include/qa-widget-related-qs.php

// replace [start]
//$questions=qa_db_single_select(qa_db_related_qs_selectspec($userid, $questionid, qa_opt('page_size_related_qs')));
$size = qa_opt('page_size_related_qs');
if($region == 'side')
  $size = 10;
$questions=qa_db_single_select(qa_db_related_qs_selectspec($userid, $questionid, $size));
// replace [end]
by
I understand, but to hard for me..
0 votes
by
you can delete "related question" under question, in Admin => Layout => Current active widget.
by
edited by
No I want to keep this here as well. Don't you know a way to define the number of relate post in qa-widget-related-qs.php?!

Have you got any answer?
...