Title: Comment Count Element Not Found
Last modified: April 30, 2021

---

# Comment Count Element Not Found

 *  Resolved [mtosh](https://wordpress.org/support/users/mtosh/)
 * (@mtosh)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/)
 * Hello, Custom Layouts Support,
 * Is Comment Count supposed to display under the Post Template Editor Elements 
   list?
 * If not, how do you add this element?
 * Thank you for your assistance.
 * Regards,
    Michael McIntosh
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcomment-count-element-not-found%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [mtosh](https://wordpress.org/support/users/mtosh/)
 * (@mtosh)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14388746)
 * Custom Layouts Support,
 * Perhaps my question should be:
    How do I add the comments number (number of comments
   the post has) to the post metadata? I have noticed that post metadata items can
   be fetched using a custom field element.
 * Your assistance would be very much appreciated.
 * Regards,
    Michael McIntosh
 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14389532)
 * Hey [@mtosh](https://wordpress.org/support/users/mtosh/)
 * This element as actually not available yet.
 * I half built it and planned to release but it didn’t quite make it to release
   yet (and no one asked for it).
 * I’ll get this included in an update I’m planning on Friday 🙂
 * Best
 *  Thread Starter [mtosh](https://wordpress.org/support/users/mtosh/)
 * (@mtosh)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14390453)
 * Hi, [@codeamp](https://wordpress.org/support/users/codeamp/),
 * And, thanks for your willingness to add this element!
 * Until it is added, can you recommend a resource that displays the correct coding
   to add the get_comments_number (or other, whatever works) to the post meta of
   all posts, so it can be fetched with a custom field element?
 * I have tried countless code examples (even the ones from WordPress) and can get
   nothing to work.
 * Your assistance is appreciated.
 * Regards,
    [@mtosh](https://wordpress.org/support/users/mtosh/)
 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14394253)
 * Hey [@mtosh](https://wordpress.org/support/users/mtosh/) – I don’t think the 
   count number is in post meta.. I think you can get it with this:
    [https://developer.wordpress.org/reference/functions/get_comments_number/](https://developer.wordpress.org/reference/functions/get_comments_number/)
 * Best
 *  Thread Starter [mtosh](https://wordpress.org/support/users/mtosh/)
 * (@mtosh)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14394352)
 * Hi, [@codeamp](https://wordpress.org/support/users/codeamp/),
 * I tried adding the coding there [function get_comments_number…] to functions.
   php but it caused an error.
 * For an example of what works, when I installed the WP plugin, HeartThis, it added
   its “Key” to the Post MetaData of all posts, so I was able to fetch that data(
   the number of “Likes” a post has) with your Custom Field element.
 * So, do you have any idea of how I can add a Post MetaData Key for the number 
   of comments a post has, so I can fetch that data with your Custom Field element?
 * Thank you for your assistance.
 * Regards,
    [@mtosh](https://wordpress.org/support/users/mtosh/)
 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14399851)
 * Hey [@mtosh](https://wordpress.org/support/users/mtosh/)
 * I think it’s going to be pretty complicated to do that, as you’d need to find
   a way to save the comment count (and keep it updated whenever someone comments)
   in the post meta, in order to use our custom field element for it.
 * I’ll get on with finishing this comment count element, it’s looking like Friday/
   Monday at the moment 🙂
 * Best
 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14421399)
 * [@mtosh](https://wordpress.org/support/users/mtosh/) just to let you know we’re
   nearly finished building this and shortly on to testing – I think we will release
   it tomorrow.
 * Best
 *  Thread Starter [mtosh](https://wordpress.org/support/users/mtosh/)
 * (@mtosh)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14421761)
 * Thank you for the update, [@codeamp](https://wordpress.org/support/users/codeamp/),
 * It will be appreciated, and I believe it will be appreciated by not only myself
   but also others.
 * Regards,
    [@mtosh](https://wordpress.org/support/users/mtosh/)
 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14426628)
 * Hey [@mtosh](https://wordpress.org/support/users/mtosh/)
 * We’re still testing/tweaking a few things to do with this update so won’t be 
   releasing just yet.
 * If you’re interested you can grab the beta from here (which has the comment count
   element): [https://drive.google.com/file/d/1PSVawXeqjYXncy6Qc3MfB9B_jRdT_IB1/view?usp=sharing](https://drive.google.com/file/d/1PSVawXeqjYXncy6Qc3MfB9B_jRdT_IB1/view?usp=sharing)
 * Best
 *  Thread Starter [mtosh](https://wordpress.org/support/users/mtosh/)
 * (@mtosh)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14427167)
 * Thanks so much, [@codeamp](https://wordpress.org/support/users/codeamp/),
 * The beta version works great for me! Thank you for including the comments number
   element! Now my headache will subside (smiley face)
 * If I may be so bold as to mention a feature request for future updates–it would
   be great if you included the ability to insert images (to represent a comment
   bubble, for example) before or after elements so we are not restricted to unicode
   text.
 * With appreciation again,
    [@mtosh](https://wordpress.org/support/users/mtosh/)
    -  This reply was modified 5 years ago by [mtosh](https://wordpress.org/support/users/mtosh/).
    -  This reply was modified 5 years ago by [mtosh](https://wordpress.org/support/users/mtosh/).
 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14431135)
 * Hey [@mtosh](https://wordpress.org/support/users/mtosh/)
 * Just to let you know the official udpate just landed, feel free to upgrade – 
   you probably won’t notice much difference.
 * Regarding your suggestion – absolutely – we’re planning on supporting the full
   block library at some point – so the idea is, you could create a “row”, add in
   your icon, and add in your template element next to it.
 * For now though, you could try adding icons with CSS as outlined in this post:
   
   [https://wordpress.org/support/topic/dash-icon-before-taxonomy/#post-14376048](https://wordpress.org/support/topic/dash-icon-before-taxonomy/#post-14376048)
 * I’ll close this ticket for now then!
 * PS, I’m trying to get feedback and reviews for this plugin – yours would be most
   appreciated if you are so inclined – [https://wordpress.org/support/plugin/custom-layouts/reviews/#new-post](https://wordpress.org/support/plugin/custom-layouts/reviews/#new-post)
 * Best
    – Ross

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Comment Count Element Not Found’ is closed to new replies.

 * ![](https://ps.w.org/custom-layouts/assets/icon-256x256.png?rev=2475457)
 * [Custom Layouts - Post + Product grids made easy](https://wordpress.org/plugins/custom-layouts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-layouts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-layouts/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-layouts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-layouts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-layouts/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Code Amp](https://wordpress.org/support/users/codeamp/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/comment-count-element-not-found/#post-14431135)
 * Status: resolved