I have a wordpress-generated page where I need some posts (in a specific category) to have a 'Sign up' button. But when I add the conditioning code, found in this helpsheet, the page just shows this error:
'Parse error: syntax error, unexpected '<' in /home006/sub008/sc74101-DVGF/gadebold.dk/wp-content/themes/gadebold/single.php on line 9'
I'm placing the conditioning code in the loop (in single.php) like this:
if ( is_category('8') ) {
<div id="tilmeldknap">
<form method='post' action='<?php echo site_url('/events/tilmeld-hold/')?>'>
<input name="event" type="hidden" value="<?php echo the_title() ?>" />
<input type="submit" name="tilmeld" value="Tilmeld Hold" /></form></div>
<?php } else { ?>
<?php } ?>
starting with a php-tag ofc. since i couldn't get the code to show with it infront.
What am I doing wrong in this snippet?