q2a / question2answer

Question2Answer is a free and open source platform for Q&A sites, running on PHP/MySQL.
http://www.question2answer.org/
GNU General Public License v3.0
1.63k stars 628 forks source link

how can I show theme functions in Custom page ? #941

Closed aydcry closed 1 year ago

aydcry commented 2 years ago

I created new page and added page in qa-page.php and it's working fine when I visit my page, I am trying to add a function from qa-template-base.php to my custom page and I tried this code ;

$themeclass=qa_load_theme_class(qa_get_site_theme(), 'custom', null, null);
$themeclass->initialize();

but it's not working.... How can I show theme function in custom page ? Many thanks for answers...

svivian commented 1 year ago

If you want custom PHP on a page you'll need to create a plugin. Feel free to ask for help on the Q2A Q&A