Includes and Conditional Statements
-
I searched for this, because it’s hard to believe I am the first to attempt this, so i am sure it has been answered before, I’m just familiar enough with PHP and WordPress lingo to find it.
I want a contact form to be php included into a page
<?php include ("includes/form.php"); ?>
was what i was using before I moved over to WP.
Now WP has the tag<?php bloginfo('template_directory'); ?>
where it will automatically grab the directory for me
Also, I am using the conditional statement so the form only shows up on one page.
So I am trying to figure out how to get
<?php if (is_page('3')) { <?php include ("bloginfo('template_directory')/includes/form.php"); ?> } ?>
all that to work.
obviously this code does not work, but does anyone have any ideas of what might work?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Includes and Conditional Statements’ is closed to new replies.