Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to load content of static html file as home page?

+1 vote
asked Nov 23, 2016 in Q2A Core by teju2friends
I don't want pasting in Admin -> Layout -> 'Custom content in home page instead of Q&A'
Q2A version: 1.8

1 Answer

+2 votes
answered Nov 28, 2016 by Scott

The best way would be to make a simple page plugin that loads it. You can copy the one from qa-plugin/example-page/ and in the process_request function, do something like this:

$qa_content = qa_content_prepare();
$qa_content['custom'] = file_get_contents('static.html');
return $qa_content;

Next, set the page plugin as your home page by adding this in qa-config.php:

    'plugin-request' => '',

Where 'plugin-request' is whatever you set as the "Page slug" in the admin.

commented Nov 28, 2016 by teju2friends
Thanks @Scott, will give a try