Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
360 views
in Q2A Core by

Hi guys,

In case you wondered on how to change the structure of the meta-description of a page, here's how...

The default construction is: "a few words from the start" ... "few words from the end".

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..

Go to qa-util-string.php.

Change at line 512 the value after $tosuffix=(($addword%... to an higher number, let's say 35.

Then go a bit down, at line 530, change this:

$string=$prefix.' ... '.$suffix;

by:

$string=$prefix.'...';//.$suffix;

So in the end the description of every page will be only the first couple of words of the questions.

Btw, you can output the description of a page by using qa-theme.php this function:

$this->content['description']

 

Please log in or register to answer this question.

...