lundi 23 mars 2015

Allowing Users to Delete Their Posts


I'm trying to allow users to delete their posts, and I'm trying to do that with the;



$or_pid = get_the_ID();
if(isset($_REQUEST['p_id']) && $_REQUEST['p_id']>0){
wp_delete_post($_REQUEST['p_id']);

}


and



<div class="tbl_col"><a class="delt" href="<?php echo get_permalink($or_pid); ?>&p_id=<?php echo $post->ID; ?>">Delete</a></div>
</div>


but it's not working. You check the whole code from http://ift.tt/1EInYmY I'd be grateful if you can help me.





Aucun commentaire:

Enregistrer un commentaire