# Custom Blog Post Template - Optimize Word Count Incorrect

**URL:** <https://community.hubspot.com/t/custom-blog-post-template-optimize-word-count-incorrect/22199>\
**Category:** CMS Development\
**Created:** [June 27, 2020, 10:33pm UTC](https://community.hubspot.com/t/custom-blog-post-template-optimize-word-count-incorrect/22199 "2020-06-27T22:33:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingramleedy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ingramleedy/32/64409_2.png) [@ingramleedy](https://community.hubspot.com/u/ingramleedy)\
**Post date:** [June 27, 2020, 10:33pm UTC](https://community.hubspot.com/t/custom-blog-post-template-optimize-word-count-incorrect/22199/1 "2020-06-27T22:33:24Z")

</div>

Hi. I am working on a customzied blog template that inserts CTAs automatically in blog content. It’s based loosely on another post here,

[https://community.hubspot.com/t5/CMS-Development/HubL-coding-in-a-blog-template-to-insert-a-line-of-text-after-a/m-p/53706](https://community.hubspot.com/t5/CMS-Development/HubL-coding-in-a-blog-template-to-insert-a-line-of-text-after-a/m-p/53706)

It works great! However, when I edit the post and go to the optimize page it shows that the Word count of whats in the Title vs what is in the content.post\_body. When I render the new content out, render out what in in content.post\_body, but when I encounter a paragraph break I insert CTA code after so many paragraphs.  
On a side note, it seems that this would be a good feature for Hubspot to have some kind of management system for blog posts, as I dont want to go thru all my blog posts and change out custom inserted CTAs. This was an easy way to add them across all assets if I am running an offer or something.  
I dont know if I am missing some kinda of tag or ID that the optimize is using. The variabe content.post\_body contains all the content it should be counting.

Any feedback is welcomed. Am I missing something?

-Ingram

---

<div class="post-metadata">

**Author:** ![ingramleedy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ingramleedy/32/64409_2.png) [@ingramleedy](https://community.hubspot.com/u/ingramleedy)\
**Post date:** [June 28, 2020, 4:24pm UTC](https://community.hubspot.com/t/custom-blog-post-template-optimize-word-count-incorrect/22199/2 "2020-06-28T16:24:21Z")

</div>

Solved.

Looks like the blog posts have to be wrapped in this class to be counted correctly.

**\<div class=“blog-post-wrapper cell-wrapper”\>**

---

<div class="post-metadata">

**Author:** ![Jenny](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jenny/32/24_2.png) [@Jenny](https://community.hubspot.com/u/Jenny)\
**Post date:** [June 29, 2020, 9:13pm UTC](https://community.hubspot.com/t/custom-blog-post-template-optimize-word-count-incorrect/22199/3 "2020-06-29T21:13:59Z")

</div>

Thank you for sharing your solution @ingramleedy!
