Hi I want to add an aweber java script code into a page template.
Here’s the php code I came up with
It works fine when ‘aweber’ exists in the database but I don’t want it show when it doesn’t exist. Which it does anyway (so what’s the problem?).
What I’d like to know is do I need to add this code into a php if statement that says only show the aweber form, “aweber”, if “aweber” exists?
<?php if ( get_post_meta($post->ID, 'aweber', true)) echo "$aweber"; ?>
If I do need to put it into an if statement do I need to use the variable and how should it be written? as the if statement above doesn’t work.
Hope this makes sense.
Thanks for your help.
- The topic ‘add aweber code into page template’ is closed to new replies.