I’m trying to find a nice easy way to estimate the word count automatically for my site without either manually figuring it out for each and every page – or writing my own code within my child theme. I THINK your plugin can help… but a running into similar issue others have had: that the plugin at default only includes ‘post_content’ and ignores everything else.
I see in two other forum posts (https://wordpress.org/support/topic/custom-fields-290/ & https://wordpress.org/support/topic/adding-to-count-with-acf-flexible-content/) that you’ve added the ‘rtwp_filter_wordcount’ filter along with the ‘up_the_count’ function. While I can follow the gist of both answers, it seems like they understood coding a bit better than my piece-meal dabbling.
My setup is a child of the Hello Elementor theme + Elementor Pro to build my page templates.
– First of all, I see that the plugin already includes my CPT ‘review’ = perfect!
– I KNOW I can use the above filter to include other ACF fields in the total count for the post/page/review.
– But while the template for ‘review’ has two fields: post_content and another WYSIWYG ACF field called ‘queerrelevance’, my template for “Top 5” posts includes the original post_content plus another 5 WYSIWYG ACF fields. Another template only uses the ‘post_content’ plus 3 additional WYSIWYG ACF fields.
If I understand the filter correctly, if I lump all the various WYSIWYG ACF fields into one filter and that page doesn’t have all of those fields, it’ll start kicking back errors? But equally if I start adding in conditional functions along with the filters, I feel like it’ll get boggled down with excess coding and defeat the simplicity of using the plugin. Is there something I am missing?
The page I need help with: [log in to see the link]
- The topic ‘Include word count for ACF fields, CPT, and multiple templates’ is closed to new replies.