您可以使用get_comment() https://codex.wordpress.org/Function_Reference/get_comment 确保在上面的链接中读取该函数的参数.您必须使用此函数传递包含整数的变量.
<?php
$my_id = 7;
$comment_id_7 = get_comment( $my_id );
$comment_post_id = $comment_id_7->comment_post_ID ;
?>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3176 次 |
| 最近记录: |