<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged changing</title>
<link>https://www.question2answer.org/qa/tag/changing</link>
<description>Powered by Question2Answer</description>
<item>
<title>Changing structure of description (small how-to)</title>
<link>https://www.question2answer.org/qa/13975/changing-structure-of-description-small-how-to</link>
<description>

&lt;p&gt;
	Hi guys,&lt;/p&gt;


&lt;p&gt;
	In case you wondered on how to change the structure of the meta-description of a page, here's how...&lt;/p&gt;


&lt;p&gt;
	The default construction is: &quot;a few words from the start&quot; ... &quot;few words from the end&quot;.&lt;/p&gt;


&lt;p&gt;
	So if you only want that the description gives you the first x number of words from the start of a question (which is usual), then..&lt;/p&gt;


&lt;p&gt;
	Go to qa-util-string.php.&lt;/p&gt;


&lt;p&gt;
	Change at line 512 the value after &lt;strong&gt;$tosuffix=(($addword%...&lt;/strong&gt; to an higher number, let's say 35.&lt;/p&gt;


&lt;p&gt;
	Then go a bit down, at line 530, change this:&lt;/p&gt;


&lt;p&gt;
	$string=$prefix.' ... '.$suffix;&lt;/p&gt;


&lt;p&gt;
	by:&lt;/p&gt;


&lt;p&gt;
	$string=$prefix.'...';//.$suffix;&lt;/p&gt;


&lt;p&gt;
	So in the end the description of every page will be only the first couple of words of the questions.&lt;/p&gt;


&lt;p&gt;
	Btw, you can output the description of a page by using qa-theme.php this function:&lt;/p&gt;


&lt;p&gt;
	$this-&amp;gt;content['description']&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/13975/changing-structure-of-description-small-how-to</guid>
<pubDate>Wed, 04 Apr 2012 19:58:41 +0000</pubDate>
</item>
</channel>
</rss>