Archived topic
GP + Discourse
1 reply · Started by André on March 12, 2018
I have a Discourse forum on the backend of our WP/GP site.
For SSO to work, and some customizations for MemberMouse, I've had to add stuff to functions.php...
I use Code Snippets to add actions to WP/GP.
HOWEVER, our MemberMouse/Discourse functions.php code doesn't want to load using Code Snippets.
So from generatepress/funtions.php I've had to append this:
require get_template_directory() . '/membermouse.php';
... and have that call an external php file (membermouse.php).
I'm guessing this isn't a GP issue. Any ideas why using Code Snippets doesn't work, but having the exact same code in a php file, then calling that from functions.php does work?
Would rather have it in Code Snippets so that the code doesn't get overwritten (and then not called).
TIA!
André
Not sure why it wouldn't work, but you should probably just use a child theme: https://docs.generatepress.com/article/using-child-theme/
Then you can have your own empty functions.php file, which you can add your code to.