Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.4k views
in Q2A Core by
reopened by
on clicking a question, it should redirect to an external link instead of landing to the correspondant question page....

how can i acheive it??

normally,

on clicking,

question directs to question page.

i want to achieve like this,

question directing to external link(say www.example.com)
by
+1
Can you clarify this question? I don't get it.
by
on clicking a question,

question directs to question page.

i want to achieve like this,

question directing to external link(say www.example.com)

i want to direct the user to an external link, when he clicks any questions displayed instead of directing to the correspondant question page......


Please help me with this guys
by
Does the receiving URL have a pattern in which the only varying thing is the originating question ID? E.G: http://q2asite.com/123 will be mapped to http://othersite.com/bleh/123

1 Answer

+2 votes
by
selected by
 
Best answer

I don't really see the point of having a question and when clicking it, instead of going to the question going somewhere else.

Anyway, assuming the resulting URL varies per question, you might need to create a way to map each question ID to a resulting URL (unless the URL is OK with receiving the question ID). Then you could use a layer to modify the URL dynamically.

Edit:

Based on your comment, in order to achieve your expectations you can follow these steps (assuming you're using the SnowFlat theme):

1. Locate this line: https://github.com/q2a/question2answer/blob/3320b653f94ffa1f004d51cc82f0e95f573ff411/qa-theme/SnowFlat/qa-theme.php#L365

2. Add in there this text:

$q_item['url'] = 'https://www.google.com/search?q=' . $q_item['title'];
by
+1
my friend,it works fine


thank you very much.......
by
my friend,i want to apply the same changes to  tags,

where i need to change???
by
pupi can you tell me ,how to make the link open in new tab or window
by
+1
...