To add a custom title for the homepage of the Q&A site, you need to add a few lines of PHP code to the file "qa-include/qa-theme-base.php".
Open the file in any editor and search for the "head_title()" function. Add the following highlighted code to this function to change the title of the homepage.
qa-include/qa-theme-base.php
public function head_title()
{
$pagetitle = strlen($this->request) ? strip_tags(@$this->content['title']) : '';
$headtitle = (strlen($pagetitle) ? "$pagetitle - " : '') . $this->content['site_title'];
// custome title for the homepage
if ($_SERVER['REQUEST_URI'] === '/'){
$headtitle = "WRITE_YOUR_CUSTOM_TITLE_HERE" . ' - ' . $headtitle;
}
}
Replace "WRITE_YOUR_CUSTOM_TITLE_HERE" with your title. That's it; now your homepage will have a custom title. The above code assumes that you have not installed Q&A CMS in a folder.
If you have installed Q2A CMS in a folder, then make this additional change in the above code:
From
if ($_SERVER['REQUEST_URI'] === '/')
to
if ($_SERVER['REQUEST_URI'] === '/FOLDER_NAME/')