<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged postid</title>
<link>https://www.question2answer.org/qa/tag/postid</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to get PostID or question url in coding a question list?</title>
<link>https://www.question2answer.org/qa/79705/how-to-get-postid-or-question-url-in-coding-a-question-list</link>
<description>

&lt;p&gt;I'm trying to manipulate (in qa theme) the question content in the question list. And I need the question link or the question postid for the purpose.&lt;/p&gt;

&lt;p&gt;The main code is based on the mouseover layer plugin. But I tried to get the postid/ question url but failed.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;qa_q_path_html(($questionid,$title,$absolute=true)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;always returns &lt;span style=&quot;color:#c0392b&quot;&gt;&lt;a href=&quot;https://mydomain.com/0/the-correct-title-of-that-post&quot; rel=&quot;nofollow&quot;&gt;https://mydomain.com/0/the-correct-title-of-that-post&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;I realized that the postid is wrong, but the title is correct.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;$title&lt;/em&gt; is defined as&amp;nbsp;&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;em&gt;$title = isset($question['title']) ? $question['title'] : '';&amp;nbsp;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, how should I define&amp;nbsp;&lt;em&gt;$questionid &lt;/em&gt;? Or the solution for this purpose.&lt;/p&gt;

&lt;p&gt;Many thanks.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/79705/how-to-get-postid-or-question-url-in-coding-a-question-list</guid>
<pubDate>Sun, 01 Dec 2019 01:50:24 +0000</pubDate>
</item>
<item>
<title>Improvement for loading Posts by POSTID after the slash (even for answers)</title>
<link>https://www.question2answer.org/qa/64801/improvement-loading-posts-postid-after-slash-even-answers</link>
<description>

&lt;p&gt;Just found out that if you add the postid of an answer after stackoverflow.com/questions/&lt;strong&gt;ID&lt;/strong&gt;&amp;nbsp;then stackoverflow redirects to the&amp;nbsp;stackoverflow.com/questions/questionID&lt;/p&gt;

&lt;p&gt;This is a fantastic feature that we could implement into the&amp;nbsp;core!&lt;/p&gt;

&lt;p&gt;(I could also write a plugin for that, but it's so awesome to deserve the core :)&amp;nbsp;)&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;PS: At Stackoverflow it only works for Q and A, we could also include Comments ;-)&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/64801/improvement-loading-posts-postid-after-slash-even-answers</guid>
<pubDate>Wed, 27 Jun 2018 12:29:06 +0000</pubDate>
</item>
<item>
<title>Any core function to get the postid / pageid?</title>
<link>https://www.question2answer.org/qa/61235/any-core-function-to-get-the-postid-pageid</link>
<description>Just wondering if I could not find it or it does not exist: A function to call to get the postid of the recent page calling. &lt;br /&gt;
&lt;br /&gt;
Something like: &lt;br /&gt;
&lt;br /&gt;
$postid = qa_get_active_pageid();&lt;br /&gt;
&lt;br /&gt;
I have seen that pages use: &lt;br /&gt;
&lt;br /&gt;
$postid = $this-&amp;gt;content['q_view']['raw']['postid'];&lt;br /&gt;
&lt;br /&gt;
for instance. But it would be handy to not always search throught $qa_content or $this-&amp;gt;content etc. to find the postid ... &lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Kai</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/61235/any-core-function-to-get-the-postid-pageid</guid>
<pubDate>Sun, 10 Dec 2017 15:53:14 +0000</pubDate>
</item>
<item>
<title>How to get only 5 links under post question, but 10 related links (in sidebar)</title>
<link>https://www.question2answer.org/qa/30423/how-get-only-links-under-post-question-related-links-sidebar</link>
<description>

&lt;p&gt;
	Hello everyone,&lt;/p&gt;


&lt;p&gt;
	I am developping a new Q2A and I get some problems during theme optimisation.&lt;/p&gt;


&lt;p&gt;
	My theme automatically add &quot;Related question&quot; under post. In &quot;Viewing&quot;, I manage to make 10 Maximum related question, but couldn't choose where.&lt;/p&gt;


&lt;p&gt;
	Then, how to get only &lt;span style=&quot;text-decoration: underline;&quot;&gt;5 links under post question&lt;/span&gt;, but 10 related links (in sidebar widget) as the same time?&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/30423/how-get-only-links-under-post-question-related-links-sidebar</guid>
<pubDate>Tue, 07 Jan 2014 09:43:07 +0000</pubDate>
</item>
<item>
<title>Plugin Dev: How to get correct link only using the postid of a question?</title>
<link>https://www.question2answer.org/qa/28932/plugin-dev-how-get-correct-link-only-using-the-postid-question</link>
<description>

&lt;p&gt;
	I am developing a page plugin currently.&lt;/p&gt;


&lt;p&gt;
	I get the question ids (&quot;postid&quot;) from a separate table.&lt;/p&gt;


&lt;p&gt;
	Now I would like to create correct links by using only the postid (the question number).&lt;/p&gt;


&lt;p&gt;
	Problem is, the default function:&lt;/p&gt;


&lt;p&gt;
	&lt;strong&gt;function qa_q_path($questionid, $title, $absolute=false, $showtype=null, $showid=null)&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;
	is expecting a &lt;span style=&quot;color:#ff0000;&quot;&gt;$title&lt;/span&gt; that I do not have. I only have the postid.&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	1. What is the current way to solve this? An extra DB-query?&lt;/p&gt;


&lt;p&gt;
	2. Why is there no core function that retrieves the title automatically by just throwing in the postid?&lt;/p&gt;


&lt;p&gt;
	Thanks,
&lt;br&gt;
	Kai&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/28932/plugin-dev-how-get-correct-link-only-using-the-postid-question</guid>
<pubDate>Fri, 08 Nov 2013 13:58:30 +0000</pubDate>
</item>
<item>
<title>Best way to get link to answer and comment from postid?</title>
<link>https://www.question2answer.org/qa/18801/best-way-to-get-link-to-answer-and-comment-from-postid</link>
<description>

&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;I had this problem couple of times and have not found a good solution yet: &lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;I have the postid and can get the type (Q | A | C) from the database (is there a handy q2a-function for this as well?). &lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;Now I need the direct link to question, answer or comment. &lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;To do the question is easy: mysite.com/postid → done&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;But how to get the links to answer and comment only from postid?&lt;/span&gt;
&lt;br&gt;
	I.e. I search for the function that accesses the database, gets parentid, and builds the correct link.&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/18801/best-way-to-get-link-to-answer-and-comment-from-postid</guid>
<pubDate>Wed, 31 Oct 2012 04:53:07 +0000</pubDate>
</item>
<item>
<title>postid for the current question being viewed?</title>
<link>https://www.question2answer.org/qa/6920/postid-for-the-current-question-being-viewed</link>
<description>Is there an easy way to get the postid for the current question that is being viewed? I will be using it inside qa-theme-base.php.&lt;br /&gt;
&lt;br /&gt;
I'm using the following URL structure:&lt;br /&gt;
&lt;br /&gt;
/123/why-do-birds-sing (requires htaccess file)&lt;br /&gt;
&lt;br /&gt;
I know I could use a regular expression to get it out of the URL. But is there another way to get it with a Q2A function?</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/6920/postid-for-the-current-question-being-viewed</guid>
<pubDate>Thu, 02 Jun 2011 19:33:20 +0000</pubDate>
</item>
</channel>
</rss>