you can get comment link by wp function
$args = array(
'number' => '1',
'post_id' => your_post_id, // use post_id, not post_ID
);
$comments = get_comments($args);
<a href="https://wordpress.stackexchange.com/questions/108654/<?php echo get_comment_link( $comments->comment_ID ); ?>">postname</a>
Related Posts:
- Most liked page not displaying posts
- Query get post,how to add comment box
- How to get posts and comments amount per hour, per year and per month?
- Get all comments of author’s posts
- Can’t get full post title if there a spaces in title
- How to display only one category in a custom post type?
- Adjust the order for returned posts
- Merge get_comments & get_posts into a single query
- How to limit the number of posts that WP_Query gets?
- Random sort within an already sorted query
- Dynamically add id to heading tags
- Confirmation box when submitting post for review
- how to get a different html for odd/even posts?
- List latest posts in WP-Admin
- Alter query on edit.php
- Change slug with custom field
- Restrict access to post if it is currently being edited
- WordPress Number of Posts Not Changing With posts_per_page
- Getting an alphabetic post list with two letters onclick on letter
- How can I allow editors to leave comments on posts that have not yet been published?
- which action to hook to in order to perform post-publish action
- Trying to put an array into ‘post__in’ => array() query not working
- Strange switch_to_blog() issue
- Comments enabled, but disabled at the same time
- Comments not showing in custom post type – WordPress
- POST from jQuery to PHP
- Enable commenting on front-end preview page for pending posts
- Query All users that has post
- $post object is null
- Search query – exact post title match
- Why is WordPress redirecting users to random posts after commenting?
- How to get most recent commented post above new submitted post in WordPress?
- Display page content AFTER a loop of posts
- str_replace the_title(); blues
- Get posts by multiple ID’s (query)
- How to start with post number x?
- Exclude posts with empty post_content in wp_query
- Only display a certain number of posts, dependent on how many posts there are available in a query
- how to find user ids of all commenters in a post
- Diplay comment date on WP_Post_Comments_List_Table
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Query how many items to show in shortcode
- Sticky post appears twice
- WordPress Custom Fields (Checkboxes with multiple values)
- How Can I Query a Specific Page From a MultiPage paginated Post
- filter RSS feed in URL
- WordPress custom Query for Posts in Category display posts multiple times
- Creating a post from data returned from HTML form
- How do you change the comment count in the back end posts list, to reflect unapproved comments, rather than all comments?
- Related Posts function not working
- Display on page every post in blog WITH comments
- Dark Bar at the top of wordpress page can’t be seen?
- displaying the categories post
- Export all posts to import as product items
- How To Use Custom Fields With .mp3 Links
- Custom Select Query – Selecting the Year?
- Prevent duplicate pages from being added
- Show 10 latest posts only from users with contributors role
- A better code for no post format?
- WordPress, custom post type and posts query help!
- How to implement a WordPress comments function?
- Return records between two meta datetimes saved as strings
- Count the total views of all user posts published
- WordPress Query – Display 5 posts (same post type), each from a given tag
- Shortcode for Comments and Comment Boxes in Post Loop
- Ignore posts content in the posts queries for internal linking
- WordPress weird behaviour on comments
- Comments are in database, don’t show up in WordPress backend or frontend
- Let user select the number of posts shown per page jquery error
- Count posts for pagination
- Sort Events by Venue Title – Sort Post set by related post ids
- Get posts associated with media attachment
- How to enable comments meta box for other author posts?
- Comments as part of a post
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Removing a post from the results of a WP Query
- 3rd Party Login in wordpress
- Query posts from a specific category and selected tag
- Apply comment to different post (not the current post) [duplicate]
- Show a Category Specific Info Box
- How to get all the terms of a post
- WP_Query retrieve custom posts but not the post showing
- Special Query: Title, Terms, Content – %LIKE%
- Display the first post’s comments of category in comments.php template
- How to display a certain template element only for posts published within certain time range?
- List direct children of page
- Unable to get posts with category on my page
- wordpress radio button on single post page
- Create post from form with image
- Exclude a ‘portfolio’ custom category?
- Display a custom field rating system in the front end
- Echo author slug in post edit page
- Adding a content rating system
- How to set value in Query Loop?
- Wp_query WooCommerce products
- How does WordPress add the comments and comment form to posts
- Display posts with id equal to relationship value
- How to update wp_posts with just the returned comment count from wp_comments (SQL GROUP BY)
- Sort Posts Alphabetically Based on Specific Category (Divi)
- Undefined Function Fatal Error with Shortcode [closed]