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

How could i show questions on custom pages?

+3 votes
272 views
asked Mar 23, 2017 in Themes by Kha Led
Hello, i need help to customize my q2a website homepage by making a custom page as the leading page i did that changes but now i need help about how adding or displaying some questions on it by saving the current view mean add questions into the new custom page or showing questions above that page.

may anyone help me please!

Thanks all :)
Q2A version: 1.7.4

2 Answers

+2 votes
answered Mar 24, 2017 by ProThoughts

Easiest way I can think is ...sign up for feedburner.google.com service, it is free.

  1. Then setup your q2a site feed using rss
  2. Go to Publicize -> BuzzBoost
  3. Copy code and paste on page you want.

You can see questions from your Q2A site, it will automatically update also.

commented Mar 24, 2017 by Kha Led
Thanks @ProThoughts for your reply but it's not what i am searching on i wanna add hot questions or recent question or question by ID into new section on homepage you can check this link www.gun-scope.com

i am using custom page need to add questions under that page

Thanks for help :)
+2 votes
answered Mar 24, 2017 by pupi1985

After you have created your custom page module, then all you need to do is to check how questions are fetched from other pages such as the activity page (in qa-include/pages/activity.php). You will mostly need to copy/paste code and then remove the unwanted behavior, if any. Some patience and basic PHP skills should get the job done.

commented Mar 25, 2017 by Kha Led
Hello Pupi1985, Thanks for your reply i tried to copy/paste the activity.php but it don't works for me could you please help me you can check this page where i add the code it's a test page with the activity.php code you could check the source code thanks for you help

http://gun-scope.com/test
commented Mar 25, 2017 by pupi1985
What you've linked is just HTML for me. You need to modify the PHP code. I can't see the PHP code of the page.

Anyway, as I said before, it is mostly a matter of making small changes to the already existing behavior. It doesn't require much Q2A knowledge but rather some PHP understanding. If you have specific PHP development questions I'd suggest you to ask them in stackoverflow.com or you can check the Q2A services page at http://docs.question2answer.org/services in case you need someone to do this for you.
...