redirect_to with an anchor?
-
I’m trying to provide a link in the comments form that takes the user to the login page, and redirects them to the #id of the comments form, so they go right back where they came from. So I constructed the link like so…
<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo get_permalink($post->ID);?>#commentform">Log in (registered user)</a>
But it keeps lopping off #commentform. Does anybody know why it is doing that? Thanks in advance!
- The topic ‘redirect_to with an anchor?’ is closed to new replies.