I apologize for the simplicity of the question, I am definitely still a beginner.
For some reason the following link works:
<a id="header-log-in" href="<?php echo get_permalink( 39 ); ?>">Log In</a>
However, the following button does not work:
<form action="<?php echo the_permalink( 39 ); ?>">
<input type="submit" id="header-create-acct" value="Sign Up" />
</form>
All help is appreciated, thanks in advance.
try this .
You are using
the_permalink()
in the second, which must be use within The Loop – it does not take a post ID as an argument. If you want to return the value of the link, you should useget_permalink( $post_id )
as in the first example – which does take a$post_id
argument – and thenecho
the result so that it prints out within theaction
attribute of yourform
.Remove the parameter from the function
From WordPress Manual :
This tag has no parameters.