Snippet: Add Post Views to the Archive & Post Meta
The following includes 2 examples showing how to add the Post Views Counter plugin views to your blog post entry and single post meta sections. The first example shows how to use a theme icon "eye" and the second is showing how to use a custom SVG. Make sure to only include one of the "myprefix_custom_meta_sections" functions and not both and to include the hooks no matter which function you choose to use.
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
We recommend Code Snippets (100% Free) or WPCode (sponsored)