Are these Posts or Pages? Where are the forms on the server?
You can’t use php in any of the native WP widgets but you could edit the relevant template file (such as sidebar.php) and add the code.
Hi there
the forms are currently just in the text widget
how would i use php to place it in the sidebar, in order to determine if its a certain page then show a certain form
Two basis options:
1. Add the markup for both forms to your sidebar and use what’s called a conditional to control what form is shown and when.
2. Duplicate your sidebar, add the forms to Text widgets on different sidebars and then use a conditional to control what sidebar to show
Which would you prefer? You still didn’t confirm whether 4400 and 4401 are Posts or Pages…
They are pages
if i use a conditional whats the code for that
i guess its something like
if ($postID = “4401”)
<?php if( is_single('4400') ) :?>
[ do foo ]
<?php elseif( is_single('4401') ) :?>
[ do bar ]
<?php endif;?>
http://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page
Thanks for that works great except the
is_single needed to be is_page
many thanks