Add php element to custom page in Wordpress

Posted by citadelgrad on Stack Overflow See other posts from Stack Overflow or by citadelgrad
Published on 2010-06-06T23:34:07Z Indexed on 2010/06/06 23:42 UTC
Read the original article Hit count: 1004

I'm trying to customize a wordpress page to include an iframe which give the users a link to there download. We're using wordpress 2.9.2 with the Thesis theme 1.51. I've been trying to use thesis hooks but appears that the php is stripped from the output. Help? Suggested alternatives?

Code from custom_functions.php:

    function add_ejunkie_download_link () {
is_page('slug-url-of-page') {
?>

<?php
echo '<iframe src="https://www.e-junkie.com/ecom/rp.php?noredirect=true&client_id=CID&txn_id=' . htmlspecialchars($_GET["txn_id"]) . '" width="100%" frameborder="0" height="50px"></iframe>';
?>

<?php
   }
}
remove_action('thesis_hook_custom_template', 'thesis_hook_custom_template');
add_action('thesis_hook_custom_template', 'add_ejunkie_download_link');

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about wordpress-theming