Creating a custom comments template
-
I want to create a custom-comments.php file that shows only the 3 most recent comments of the most recent post of a particular category. I know how to get the latest post I can get the comments I just can’t make it stop after getting 3 comments. Normally you can do this with the Custom Content Plugin using the code
[comments count=3 id=this] [comment] by [comment author] on [comment date] [/comments]but for some reason on my site it’s mixing the post content in with the comments content or not showing any comments at all. That’s why I want to hardcode it into a custom-comments.php file
I ONLY NEED THE PHP CODE / WP HOOK THAT WILL DO WHAT THE CUSTOM CONTENT PLUGIN DOES, SO THIS SHOULD BE SOMETHING REALY SIMPLE THAT’S BUILT INTO WP ALREADY
please don’t refer me to the comments settings in WP I don’t want to change the site wide settings I only want one instance on one page to change. On the normal single post page I want it to show all comments.
I’m asking for something really simple I just can’t find the right hook/syntax in the documentation. A WP guru should know this off the top of his/her head. I’m sure what I’m looking for is just 1-3 lines of code — I just can’t find it in the documentation. I tried to outsource it to a “WordPress Expert” on Fiverr but nobody seems to get what I’m looking for and they’re all making it so much more complicated than it needs to be. [redacted] 3 lines of code that gets me there. I just need someone’s help me to find them.
Thanks
The topic ‘Creating a custom comments template’ is closed to new replies.