I don’t know what your comments.php
looks like, so I cannot tell how to adapt your current code, but I can generally tell you how to approach this.
Normally, WP will assume that you want the latest comments of the current post. If you want something else, you start with the condition under which you want your second set of comments to show and add this to comments.php
: if (my_condition) { show second comments set; }
Now, you have to tell WP which set of comments to use. You need to set $args
which are available in the get_comments
function. There are too many options to describe here.
Once you have retrieved comments with $comments=get_comments($args);
you can feed them into the display function wp_list_comments($args,$comments)
. The $args
to this function determine how the comments are displayed. You can have them shown completely different from you other comments set.
Related Posts:
- Why are the comments disabled by default on my custom_post_types?
- Why are comments and trackbacks still getting through for custom post types?
- Display Authors Comments on Profile Page
- List all posts commented by current user
- Custom Comment Types
- modify all posts of a category to “no comments allowed”
- Custom comment status possible?
- feed links for custom post type pages
- Seperating custom post type comments from regular blog posts comments
- Add comments meta fields to comments metabox on post edit screen
- Exclude post_type from admin comments_list
- Recent comments on author page?
- wp_query and comment_parent – select only posts with top level comments
- changing default comment form arguments [duplicate]
- Comment moderation on custom post types
- Automatically check “Allow comments” for custom post type [duplicate]
- How could I create a ‘private comments’ section on a custom post type?
- Disable comments from showing up public for Custom Post Type
- Custom Post Type loops and Disqus
- “Allow Comments” box cannot be checked
- Separate comment section for post type in dashboard
- Count all comments of a custom post type
- custom comments on specific post type
- Insert data on comment post
- get_comments not working on custom post types
- Custom Post Type Set Comments ON by default without show METABOX
- WordPress comments_open for specific user role or post type
- Add custom field in comments form
- Create another comment system for CPT
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Convert comments to Custom Post Type
- How to assign classes to all elements?
- custom comments form for custom post type
- What functions does WordPress use for filtering / sanitizing comments?
- comment_notification_text filter for custom post type
- get comments by current user inside page template
- User-submitted reviews of different custom post types
- Check if user has comment on current post
- Enable comments on custom page type – option not showing in “customize” for theme
- Allow anonymous comments just in a custom post type
- duplicate comment section functionality and call it something else for custom post types
- Send email messages after comment was submitted
- comments hooks on custom post type
- custom comment fields on CPT
- unapprove comments on custom post type
- Enable comments for post when comments meta box removed
- Get the latest comment from a custom post type where depth = 1?
- Why will comments not remain open on custom post types?
- How to add comments to my custom post type but hide it from default WordPress Comments section?
- How to change the comments form title based on post type
- Comments on posts with new custom post type redirected to another post
- Display custom posts, ordered by most commented, without duplicates
- get comments for custom post type
- How to create a discussion post when a custom post is created?
- Custom post type updated to support comments, yet comments don’t appear
- Comments not enabled for custom post types
- Turn off comments for given CPT checkbox?
- Author profile comments system
- Custom post type: can’t enable comments by default
- Comment moderation with disqus comments
- add comments custom fields after user is logged in
- Comments are not working on Custom Post Type
- Error 403 when posting comments to a custom post type from a different page
- Comments not working (error not allowed) on posts with custom post status
- Show custom post type inside a custom post type
- Not getting posts of custom post types
- Warning after create Custom post type with Roots theme
- custom post type search by reference id
- pagination not working for category.php (custom post types in categories)
- Adavnced custom fields relationship query plus query inside
- Query based on custom fields start and end date
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Display and register custom categories for custom post types
- How to add multiple markers on the google map, at a certain meta_key and meta_value
- Save custom post type to external database
- wp_dropdown_pages doesn’t work with post_type argument
- How can i create an custom post template for an specific post category? [closed]
- Why is my WP_Query outputting my entries twice?
- Meta Box on Custom Post Type not saving
- How do I control the output of a custom post type in the loop?
- How to display Related Posts based on number of taxonomy terms matched
- Different Category system needed for the Custom Post Type
- Not Able To Render Single-CustomPostType.php File
- How do you get the full size url of an attachment image
- Display custom post type posts first, then default posts
- Custom post type posts don’t show in archive widget
- Custom Post Types in the WordPress Navigation Menu
- Custom Post Type Category Link
- Problems wp_insert_post and save_posts filter
- How to specify a template for a path like http://example.com/something?
- Retrieve custom post types by custom taxonomies with WP_Query
- Add a permalink variable onto custom post type URL after post name slug
- Custom Post type category pages template and loop
- Custom templates for a specific category
- Custom fields for custom post type
- Archive for a Taxonomy of a Custom Post type
- Why does not this wp_redirect work in is_single()?
- Three Most Recent Posts, One Per Term