Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
1.2k views
in Q2A Core by
How do I change title for my question pages for search engines .

As you know the defult title structure is

Page Title + Website Title

Please tell me how to change it to

Page Title only

2 Answers

0 votes
by

Use an advanced theme and override the head_title() function.

by
<?php

    class qa_html_theme extends qa_html_theme_base
    {
        function head_title()
        {
            if($this->template == 'question') {
                $pagetitle=strip_tags(@$this->content['title']);
                $this->output('<TITLE>'.$pagetitle.'</TITLE>');
            }
            else qa_html_theme_base::head_title();
        }
    }

It is not working for me ? please help
by
Can you please provide me complete qa.theme.php ?
0 votes
by

qa-include/theme-base.php

Line 295

$headtitle = (strlen($pagetitle) ? "$pagetitle - " : '') . $this->content['site_title'];

After change

$headtitle = (strlen($pagetitle) ? "$pagetitle - " : '') . $this->content['      '];

Just Remove site_title

...