[wp-testers] Postlink in comments?
    Frank Bueltge 
    frank at bueltge.de
       
    Sat Nov  8 22:44:00 GMT 2008
    
    
  
Actually it is not possible to have a link to the post in frontend in
the commments. Come this link back?
PLease set the link in dashboard and comments-page in backend.
Alternativ is this possible via link. I think, a plugin is not necessary.
function view_post_to_comment($actions, $comment) {
    $comment = $GLOBALS['comment'];
    $postlink = get_permalink($comment->comment_post_ID) . "#comment-"
. $comment->comment_ID;
    $posttitle = get_the_title($comment->comment_post_ID);
    $actions['viewpost'] = "<a href='$postlink'
title='$posttitle'>View post</a>";
    return $actions;
}
add_filter('comment_row_actions','view_post_to_comment');
    
    
More information about the wp-testers
mailing list