Dear ENFOLD support team,
we need to execute a shortcode, if site visitors click on a AVIA Button.
So far we helped ourselves with a normal button by adding to following code to functions.php:
function button_shortcode(){
//Begin Formular
echo ‘<form method=”post”>’;
echo ‘<input type=”submit” name = “senden” value=”Shortcode abrufen”/>’.”<br>”;
echo “</form>”;
// End Formular
if (isset($_POST[‘senden’]))
{
//Hier Shortcode einsetzen, wichtig: einfache Hochkommas
echo do_shortcode(“[real3dflipbook id=’4′]”);
}
}
add_shortcode(‘flipbookbutton’, ‘button_shortcode’);
How can we do this with an Enfold AVIA button?
Best regards,
Bernd
Hey Bernd,
Not sure if it can easily be done, but you could try triggering with a script in your function, here’s such an example: https://kriesi.at/support/topic/adding-onclick-to-button/#post-417503
Best regards,
Mike