Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
478 views
in Q2A Core by
Hello, how to add in <HEAD> meta description "keywords". Any ideas??

2 Answers

+3 votes
by
Login to your admin panel and select layout tab. Check the box Custom HTML in <head> section of every page and add this code.

 <meta name="keywords" content="Add keyword 1, Add keyword two, Add keyword three, Add keyword four">

I hope I got your question rightly.
by
But I want only for home page.
+2 votes
by
  1. Create your layer plugin.
  2. Replace "c_list" function inner example of layer plugin with "head_metas" function below.
public function head_metas() {
    // Meta keywords will be shown only on the home page.
    if(empty(qa_request()) && (!isset($this->content['keywords']) || empty($this->content['keywords'])))
        $this->content['keywords'] = 'Keyword1,Keyword2,Keyword3';    // <- Set your favorite keywords.
    qa_html_theme_base::head_metas();
}

Note: ​ This logic will move correctly in case of "Custom home page" ("Admin" > "Layout" > "Custom content in home page instead of Q&A").

...