Note that it might be easier to use get_comments()
here, since it’s defined as:
function get_comments( $args="" ) {
$query = new WP_Comment_Query;
return $query->query( $args );
}
If you need the comment url, within your foreach
comment loop, you can use:
$comment_url = esc_url( get_comment_link( $comment ) );
You can also get the post id from the $comment
object with:
$post_id = $comment->comment_post_ID;
then you can use that to retrieve the custom post meta:
$property_address = get_post_meta( $post_id ,'imic_property_site_address',true);
To get the corresponding post permalink
$post_url = esc_url( get_permalink( $post_id ) );
Related Posts:
- WordPress loop by meta key that is an array? and how loop multiple arrays
- How to add post meta in while loop?
- Efficient way of querying for a “fallback” post?
- Using loop pagination on single.php
- Loop with slider (slider not loading)
- How to hide all child pages with post_query?
- How to sort posts based on the value (number) of a post’s metadata?
- Show css depending on activity type in BuddyPress activity-loop [closed]
- Sending data from custom inputs in WordPress comment form in the admin notification email
- Why my filterable portfolio page work not perfectly between slug button and slug output WORDRPESS?
- Show wp_die if url form comment not emply
- Sort custom meta column by other meta value
- Why does my callback function not work with this custom filter hook?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- Creating user status mode in WordPress
- Need help with Google drive API [closed]
- Iterate through posts based on array of categories
- get author_name from queried post
- Displaying Woocommerce Product Category in WordPress
- How can I add extra word in permalink when someone click download button?
- How to implement a rating and review system for WordPress custom posts?
- Increase offset while looping
- Blog posts repeat
- Ajax load more button for comments wordpress
- How to add condition in wordpress loop? [closed]
- Woocommerce : Can’t get product info in loop
- How to set variable, pass it to a partial file and remove it after?
- how to refresh div on template part?
- edit_comment_link is not showing for comment author
- Limit 1 global comment per minute
- Alert Bar section within WP loop is displaying even though there are no posts
- Create Page To Count Comments For Each Post In WordPress Site
- remove post that has no content
- Archive post by meta value + 24hours
- Display category name only once inside loop
- comments sorting incorrectly across multiple pages
- Commenting out unwated CSS/scripts in HTML with PHP
- Can’t find infinite loop cause
- Checking array against author id in loop
- How do I Turn This Into An if statement?
- WordPress update_post_meta updating with empty meta_value field [closed]
- wp-comments-post.php file returns a blank page
- php function to display commenter username or login
- Load wordpress content in other domain
- Genesis framework comments broken?
- How Can I use WP_Query to Only Display 1 Post from Custom Post Type if Query Returns Posts with Matching ID in Custom Field
- Checkbox doesn’t stay checked, conten
- check if comment submitted was successful
- post thumbnail, conditions, else wont work
- Widgets in the loop if active
- Alter required message using comment form api
- List posts that don’t have a specific tag?
- Changing the_posts_navigation() html output
- Can we count the WordPress Loop
- Is it possible to retrieve all posts with a certain value for metadata?
- Syntax error when I try to insert my loop into an unordered list? [closed]
- WP_Query fails despite having 1 post
- Non-Closing PHP Query in WordPress Loop
- Add content after the first post in WP Loop
- wp_query get the 2nd post
- Loop stopped working
- How to get post ID in a Page?
- Custom Pagination is Broken
- Display an image if odd number of posts in grid
- WordPress comment submit button substitutes/options
- How to loop through all the attached images in a post, and get their url one by one
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- How to list commenters and days since last commented
- PHP Warning: strip_tags() expects parameter 1 to be string?
- Output meta into arrays
- Querying Database with wpdb
- Store post content in a php variable and output them using for loop
- How to add div blocks after certain set of post
- Echo a shortcode div after every 3 posts
- How to avoid duplicates when creating recent network posts
- How to add text to the start of all comments?
- Does anyone know all parameters of get_comments()
- How to overwrite orderby with add_query_var
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Why in my theme I can’t see all the statics content under the posts?
- Appended comments but they show up above the content instead of below
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- get comment data using comment id
- Removing the comment function within wordpress
- Is the 404 page automatically displayed if a loop returns nothing?
- update_post_meta only updating on last loop of foreach
- How do I remove a category from a wordpress loop>
- variable value disappears in a second loop
- Last class on last headline?
- Show recent posts starting at a specific number archive
- wp_delete_comment takes two tries to delete – then deletes all comments
- how to get serialized post meta
- get_the_ID() in the footer returns wrong value
- How to get the last category name of a child category?
- Change “No Comments” link to “My String” on Blog Post (Find Snippet in Code or use CSS, PHP Solution) [closed]
- How to use two meta_compare in an array?
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- WordPress query undefined offset in loop