Delete in Frontend in P2
I found a couple of posts about this, but they were all closed to replies. I’ve added this to entry.php
<?php if ( current_user_can( 'edit_post', get_the_id() ) ) : ?> | <a href="<?php echo ( get_delete_post_link( get_the_id() ) ); ?>" class="delete-post-link" rel="<?php the_ID(); ?>"><?php _e( 'Delete', 'p2' ); ?></a> <?php endif; ?>
That adds the delete link, and it works with the ajax, but it appends a bunch of trash to the url like mysite.com/?trashed=1&ids=110. How can I force this to be stripped off the url after completing the delete? it causes some problems with replies in some browsers. Also, how would I use this same method to delete comments? thank you for your responses.
- The topic ‘Delete in Frontend in P2’ is closed to new replies.