Hi there,
on my older site I was using the Insert PHP plugin which helps me to display individual PHP code in blog posts. For this I have a function in my functions.php:
function pythonPage($key, $defaultVersion="couple", $indi=True)
{
$version = isset($_GET['version']) ? $_GET['version'] : $defaultVersion;
$url = "https://packlisten.pythonanywhere.com/page/".$key."/".$version;
if ($indi)
$url .= "/indi";
$success = include $url;
if (!$success) {
header('Location: https://www.packlisten.org/wartungsarbeiten/');
exit;
}
}
With the help of the plugin I call the function like this:
[insert_php]
pythonPage("Wochenendausflug");
[/insert_php]
I tried it on a separate installation with Generatepress and it works. My question is: Could I avoid this plugin and a child theme and instead get the same result with your Elements module?
Thanks in advance!
Best regards
Jasmin
GeneratePress 2.2.2
GP Premium 1.7.8