does not count even with views:
do_shortcode(“[post-views]”, $post_id)
shortcodes don’t accept parameters like that and requires echo:
echo do_shortcode("[post-views]");
or you can use a function
pvc_post_views();
optionally with post id parameter
pvc_post_views( $post->ID );
I must insert the shortcode here:
postExcerptHTML .= '</div><div class="subhome">' . get_field('sub_title', $post->ID ) . '</div><div class="subhomebold">' . get_field('subtitle_bold', $post->ID ) . '</div><div style="display:block;">' . <strong>do_shortcode('[post-views]', $post>ID)</strong> . '</div>'
And doesn’t work with:
pvc_post_views();
or
pvc_post_views( $post->ID )
And I have w3 total cache. Is maybe this problem?
errata corrige:
postExcerptHTML .= ‘</div><div class=”subhome”>’ . get_field(‘sub_title’, $post->ID ) . ‘</div><div class=”subhomebold”>’ . get_field(‘subtitle_bold’, $post->ID ) . ‘</div><div style=”display:block;”>’ . do_shortcode(‘[post-views]’, $post>ID) . ‘</div>’
I enter the code in the red rectangle but the number of visits shows all over and not individually. Why?
Example:
http://postimg.org/image/7k9u7lhhn/
there are issues with your code syntax:
please just try to use plain function as explained above and check the result.