Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by

Hai to all, My q2a site never showing  meta title on its header. We need to do some seo operations but the site never shows all the meta tags how can we customize this requirement

Now showing meta tags are

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Why the translations for themes works in wordpress? - My Q2a site</title>
<meta name="description" content="I am using in wordpress templates. Why the translations for themes works in wordpress? ">
<meta name="keywords" content="Programming,php,wordpress,internationalization,-themes">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content=" Login Popup using Twitter Bootstrap Modal - Social Login Popup ">
<meta name="viewport" content="width=device-width, initial-scale=1">

How can I add the meta title in this header. Is the meta title means <title> tag if yes please tell its functioning with SEO


Please help as soon as possible.

Thanks in advance


Q2A version: ver- 1.6.3
So you want, only for question pages, to add a <meta> tag to the header that contains the title of the question? Something like this?
<meta name="title" content="title-of-the-question">
Yes exactly. How its possible.?

1 Answer

+1 vote
selected by
Best answer

Just add this function to your qa-theme/<your-theme>/qa-theme.php file:

function head_metas() {
    if ($this->template === 'question' && strlen($this->request)) {
        $pagetitle = strip_tags(@$this->content['title']);
        $this->output('<meta name="title" content="' . $pagetitle . '"/>');
If the function was already there, then don't add it but rather merge it.
Thanks @pupi1985