Use get_comments
function.Pass Post_id
as parameter.See below example
<?php
$comments = get_comments('post_id=15');
foreach($comments as $comment) :
echo($comment->comment_author);
endforeach;
?>
for more detail please check below link
Related Posts:
- How to: inspect global variables in WordPress
- get_post() vs global $post or $GLOBAL[‘post’]
- How to deal with global information without creating a Singleton class
- Using global $post v/s $GLOBALS[‘post’]
- Accessing $post global on a custom post type archive page
- get_query_var vs global query variables?
- What is the global $wp object used for?
- WP 4.4.1 allow empty comments via add_action ‘pre_comment_on_post’
- Change global values from templates
- Will $current_user no longer be global?
- Add classname comment template from functions.php
- How to avoid repeatedly use the new statement to instantiate a class? [closed]
- Is $page a global variable in wordpress?
- How can i use a global variable in a .css file generated with php?
- Current page id returns the incorrect value
- Echo get_the_category() outside of loop (global?)
- How does WordPress make its functions globally available?
- Recommendations on accessing current user data in WordPress
- WP user agent returns random variables
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- How to save a viewer specific option
- What is the correct way to obtain access to the WP_oEmbed object?
- $GLOBALS[‘value1’] is not working
- Creating a (global)-mapping
- wp localize script makes variable global, how to solve that?
- using globals from wp_link_pages function
- Is there a way to natively return the full filesystem path when using $wp_styles?
- Is there a way to create multiline comments in Python?
- Is it bad practice to comment out single lines of CSS with //?
- Can comments be used in JSON?
- Can comments be used in JSON?
- How do I comment out a block of tags in XML?
- Is there a way to convert all comments into javadoc comments? [Eclipse/Java]
- How do I comment out a block of tags in XML?
- How do you do block comments in YAML?
- Can comments be used in JSON?
- How do you comment out code in PowerShell?
- Comments in Markdown
- Comments in Markdown
- Visual Studio /**/ comment shortcut?
- How to “comment-out” (add comment) in a batch/cmd?
- Is ‘# -*- coding: utf-8 -*-‘ also a comment in Python?
- How to add comments into a Xaml file in WPF?
- Is it possible to have a multi-line comments in R?
- What is the common header format of Python files?
- How to “comment-out” (add comment) in a batch/cmd?
- Multi-Line Comments in Ruby?
- How to comment and uncomment blocks of code in the Office VBA Editor
- How to write a comment in a Razor view?
- How to write an inline-comment in Python
- R: Comment out block of code
- What’s a quick way to comment/uncomment lines in Vim?
- single line comment in HTML
- Details of difference between @see and @inheritDoc
- Multi-Line Comments in Ruby?
- How to change “Leave a Reply” title in wordpress twentyfifteen theme
- Where can I find the “Leave a Reply” line in the WordPress SmartBiz.1.1.1 theme?
- Show comments on WordPress home page
- How to set and use global variables? Or why not to use them at all
- Why do I get comment spam even with Akismet and Captcha?
- Is there ANY way to remove comments function and section totally?
- What tools are available for managing/writing to WordPress? [closed]
- How to rearrange fields in comment_form()
- Should we trust the post globals?
- WordPress Multisite – global categories
- setting comments off as default for pages and custom post types?
- How to pass arguments from add_settings_field() to the callback function?
- how to reduce the number of spam comments
- What is a good alternative to using $content_width for image optimization?
- Is it possible to pull comments from facebook into your blog?
- Find out which moderator approved comment?
- Passing variables from header.php to template and vice verca
- When to use global $post and other global variables?
- What is $post_id? is it a global variable in WordPress?
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- How to export comments in WordPress?
- Non-threaded comment replies with link to original comment
- How to make comments work for a post loaded per Ajax?
- Approve comment hook?
- Commenting in user profile page?
- How to change “You must be logged in to post a comment.”
- How to get comments by post ID?
- WordPress Theme variables scope
- What are the package and subpackage comment for?
- comment_post_ID 0 (cannot remove from dashboard)
- Why are the comments disabled by default on my custom_post_types?
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- Change HTML Produced by wp_list_comments()
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Is it possible to filter comments in a post so a user can only see the comments they have written?
- Why are comments and trackbacks still getting through for custom post types?
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- Any advantage of using wp_scripts and is_IE when enqueuing scripts
- WP_Comment_Query pagination, delving into the unknown
- Reducing the use of global $post
- How to enable comments for pending and draft posts?