I’m making a theme for a car sharing site and the setup for it is a user should be able to post a ‘ride’ and other users will be able to join it.
Now I made ‘ride’ a custom post type and I’m thinking of using the comments as a way for users to ‘join’ a ride.
I know that may not be the perfect solution. If you have any suggestion, pls do leave one.
Anyway, back to the comments, I want to be able display the latest 3 comments and if there’s no comments, there should be like temporary box/spot displayed.
Like there are 3 spots and comments will fill those spots and if for example, there are 2 comments so far, that means 2 spots so there should be a spot available for the third comment and there should be a code there saying join or comment.
I am thinking of using get_comments but I don’t know how to do it.
The topic ‘displaying latest 3 comments of a post and displaying a temporary box’ is closed to new replies.
(@streetrose)
10 years, 8 months ago
I’m making a theme for a car sharing site and the setup for it is a user should be able to post a ‘ride’ and other users will be able to join it.
Now I made ‘ride’ a custom post type and I’m thinking of using the comments as a way for users to ‘join’ a ride.
I know that may not be the perfect solution. If you have any suggestion, pls do leave one.
Anyway, back to the comments, I want to be able display the latest 3 comments and if there’s no comments, there should be like temporary box/spot displayed.
Like there are 3 spots and comments will fill those spots and if for example, there are 2 comments so far, that means 2 spots so there should be a spot available for the third comment and there should be a code there saying join or comment.
I am thinking of using get_comments but I don’t know how to do it.