{"id":116689,"date":"2020-02-01T07:50:37","date_gmt":"2020-02-01T07:50:37","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wp-post-views\/"},"modified":"2026-05-20T16:21:12","modified_gmt":"2026-05-20T16:21:12","slug":"wp-post-views","status":"publish","type":"plugin","link":"https:\/\/ltz.wordpress.org\/plugins\/wp-post-views\/","author":16968317,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.23.1","stable_tag":"1.23.1","tested":"7.0","requires":"5.4","requires_php":"7.4","requires_plugins":null,"header_name":"WP Post Views - Wordpress Post views counter","header_author":"","header_description":"WP Post Views.","assets_banners_color":"aeaeae","last_updated":"2026-05-20 16:21:12","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/paypal.me\/vanpariyar","header_plugin_uri":"https:\/\/github.com\/vanpariyar\/wp-post-views","header_author_uri":"https:\/\/vanpariyar.github.io","rating":4.2,"author_block_rating":0,"active_installs":4000,"downloads":67713,"num_ratings":5,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"vanpariyar","date":"2020-02-03 22:05:39"},"1.10":{"tag":"1.10","author":"vanpariyar","date":"2022-07-18 11:37:34"},"1.11":{"tag":"1.11","author":"vanpariyar","date":"2022-10-19 13:44:25"},"1.12":{"tag":"1.12","author":"vanpariyar","date":"2023-03-23 11:07:40"},"1.13":{"tag":"1.13","author":"vanpariyar","date":"2023-06-16 06:57:51"},"1.14":{"tag":"1.14","author":"vanpariyar","date":"2023-09-21 04:57:25"},"1.15":{"tag":"1.15","author":"vanpariyar","date":"2024-03-12 07:20:10"},"1.16":{"tag":"1.16","author":"vanpariyar","date":"2024-03-12 07:41:25"},"1.17":{"tag":"1.17","author":"vanpariyar","date":"2024-11-30 14:15:48"},"1.19":{"tag":"1.19","author":"vanpariyar","date":"2024-12-16 10:00:20"},"1.2":{"tag":"1.2","author":"vanpariyar","date":"2020-04-26 15:07:40"},"1.20":{"tag":"1.20","author":"vanpariyar","date":"2025-02-04 16:48:00"},"1.21":{"tag":"1.21","author":"vanpariyar","date":"2025-09-26 06:48:09"},"1.22":{"tag":"1.22","author":"vanpariyar","date":"2025-12-15 11:59:15"},"1.23.0":{"tag":"1.23.0","author":"vanpariyar","date":"2026-05-20 12:11:15"},"1.23.1":{"tag":"1.23.1","author":"vanpariyar","date":"2026-05-20 16:21:12"},"1.3":{"tag":"1.3","author":"vanpariyar","date":"2020-04-26 15:33:53"},"1.4":{"tag":"1.4","author":"vanpariyar","date":"2020-12-15 09:31:55"},"1.5":{"tag":"1.5","author":"vanpariyar","date":"2021-03-05 12:37:04"},"1.6":{"tag":"1.6","author":"vanpariyar","date":"2021-07-14 13:55:22"},"1.7":{"tag":"1.7","author":"vanpariyar","date":"2021-07-14 14:02:20"},"1.8":{"tag":"1.8","author":"vanpariyar","date":"2021-12-19 15:51:02"},"1.9":{"tag":"1.9","author":"vanpariyar","date":"2022-01-23 05:57:42"}},"upgrade_notice":{"":"<p>Please update for the new Gutenberg block and improved performance.<\/p>"},"ratings":{"1":1,"2":0,"3":0,"4":0,"5":4},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3539043,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3539121,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3539043,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"wp-post-views\/post-views":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"wp-post-views\/post-views","version":"1.0.0","title":"Post Views","category":"widgets","icon":"visibility","description":"Display the number of views for the current post.","supports":{"html":false,"align":true,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true}},"textdomain":"wp-post-views","editorScript":"file:.\/index.js","editorStyle":"file:.\/editor.scss","style":"file:.\/style.scss"}},"tagged_versions":["1.0","1.10","1.11","1.12","1.13","1.14","1.15","1.16","1.17","1.19","1.2","1.20","1.21","1.22","1.23.0","1.23.1","1.3","1.4","1.5","1.6","1.7","1.8","1.9"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3539043,"resolution":"1","location":"assets","locale":"","width":1269,"height":508},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3539121,"resolution":"2","location":"assets","locale":"","width":602,"height":587},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3539121,"resolution":"3","location":"assets","locale":"","width":1272,"height":367},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3539121,"resolution":"4","location":"assets","locale":"","width":744,"height":397},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3539121,"resolution":"5","location":"assets","locale":"","width":1000,"height":572},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3539121,"resolution":"6","location":"assets","locale":"","width":1075,"height":739},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3539121,"resolution":"7","location":"assets","locale":"","width":1177,"height":736}},"screenshots":{"1":"Post Views column in the WordPress admin post list.","2":"Main plugin settings page showing post type selection and IP filtering.","3":"The \"Post Views\" Gutenberg block in the block inserter.","4":"Customizing the Post Views block in the editor sidebar.","5":"Frontend display of post views on a single blog post.","6":"Using the shortcode to display total views per post type.","7":"Tracking views across different custom post types."}},"plugin_section":[],"plugin_tags":[232,869,5990,522,872],"plugin_category":[36],"plugin_contributors":[181479,181161,221094,214729,181423],"plugin_business_model":[],"class_list":["post-116689","plugin","type-plugin","status-publish","hentry","plugin_tags-analytics","plugin_tags-counter","plugin_tags-post-views","plugin_tags-stats","plugin_tags-views","plugin_category-analytics","plugin_contributors-ankitatanti","plugin_contributors-brijeshdhanani","plugin_contributors-kajalgohel","plugin_contributors-piyushmultidots","plugin_contributors-vanpariyar","plugin_committers-vanpariyar"],"banners":{"banner":"https:\/\/ps.w.org\/wp-post-views\/assets\/banner-772x250.png?rev=3539043","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wp-post-views\/assets\/icon-128x128.png?rev=3539043","icon_2x":"https:\/\/ps.w.org\/wp-post-views\/assets\/icon-256x256.png?rev=3539121","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-post-views\/assets\/screenshot-1.png?rev=3539043","caption":"Post Views column in the WordPress admin post list."},{"src":"https:\/\/ps.w.org\/wp-post-views\/assets\/screenshot-2.png?rev=3539121","caption":"Main plugin settings page showing post type selection and IP filtering."},{"src":"https:\/\/ps.w.org\/wp-post-views\/assets\/screenshot-3.png?rev=3539121","caption":"The \"Post Views\" Gutenberg block in the block inserter."},{"src":"https:\/\/ps.w.org\/wp-post-views\/assets\/screenshot-4.png?rev=3539121","caption":"Customizing the Post Views block in the editor sidebar."},{"src":"https:\/\/ps.w.org\/wp-post-views\/assets\/screenshot-5.png?rev=3539121","caption":"Frontend display of post views on a single blog post."},{"src":"https:\/\/ps.w.org\/wp-post-views\/assets\/screenshot-6.png?rev=3539121","caption":"Using the shortcode to display total views per post type."},{"src":"https:\/\/ps.w.org\/wp-post-views\/assets\/screenshot-7.png?rev=3539121","caption":"Tracking views across different custom post types."}],"raw_content":"<!--section=description-->\n<p>WP Post Views counts the views of your built-in post types (Posts, Pages) and Custom Post Types. It provides multiple ways to display these counts, including a modern Gutenberg block, shortcodes, and PHP functions.<\/p>\n\n<h3>Features And Options:<\/h3>\n\n<ul>\n<li><strong>Simple &amp; Easy:<\/strong> Designed to be simple and easy to understand for everyone.<\/li>\n<li><strong>Gutenberg Block:<\/strong> A dedicated \"Post Views\" block for easy placement in your layouts.<\/li>\n<li><strong>IP Filtering:<\/strong> Option to filter views by IP address to ensure accurate counts.<\/li>\n<li><strong>Post Type Support:<\/strong> Choose which post types to track in the settings.<\/li>\n<li><strong>Admin Column:<\/strong> View counts directly in your post\/page lists in the admin dashboard.<\/li>\n<li><strong>Performance:<\/strong> Optimized queries and transient caching for total view counts.<\/li>\n<\/ul>\n\n<h3>How to Display Post Views:<\/h3>\n\n<p><strong>1. Gutenberg Block<\/strong>\nSearch for the \"Post Views\" block in the editor.<\/p>\n\n<p><strong>2. Shortcodes<\/strong>\n- <code>[WPPV-TOTAL-VIEWS]<\/code>: Display the view count for the current post.\n- <code>[WPPV-TOTAL-VIEWS-PER-POST-TYPE post_type=\"post\"]<\/code>: Display total views for a specific post type.<\/p>\n\n<p><strong>3. PHP Function<\/strong>\n    <\/p>\n\n<h3>Tutorial<\/h3>\n\n<p>[youtube https:\/\/youtu.be\/11NH5xOBs68]<\/p>\n\n<h3>Development<\/h3>\n\n<ul>\n<li>Development happening on GitHub :- <a href=\"https:\/\/github.com\/vanpariyar\/wp-post-views\">WP Post Views Github<\/a><\/li>\n<li>Create issue on the GitHub OR Pull request for new feature when new tag added it will automatically deployed.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin via the WordPress.org plugin directory or by uploading the files to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate the plugin through the 'Plugins' menu.<\/li>\n<li>Configure settings at <strong>Settings &gt; WP Post Views<\/strong>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20work%20with%20caching%20plugins%3F\"><h3>Does it work with caching plugins?<\/h3><\/dt>\n<dd><p>Yes. WP Post Views uses a lightweight JavaScript-based tracking method to ensure views are counted even when your site is served via a caching plugin (like WP Rocket, W3 Total Cache, etc.).<\/p><\/dd>\n<dt id=\"can%20i%20track%20views%20for%20custom%20post%20types%3F\"><h3>Can I track views for custom post types?<\/h3><\/dt>\n<dd><p>Absolutely. You can select which post types to track in the plugin settings page.<\/p><\/dd>\n<dt id=\"how%20can%20i%20exclude%20my%20own%20views%3F\"><h3>How can I exclude my own views?<\/h3><\/dt>\n<dd><p>The plugin includes an IP filtering feature. You can enter your IP address in the settings to prevent your own visits from being counted.<\/p><\/dd>\n<dt id=\"how%20do%20i%20display%20the%20view%20count%3F\"><h3>How do I display the view count?<\/h3><\/dt>\n<dd><p>You have three options:\n1. Use the \"Post Views\" Gutenberg block.\n2. Use the <code>[WPPV-TOTAL-VIEWS]<\/code> shortcode.\n3. Use the <code>get_post_view()<\/code> PHP function in your theme templates.<\/p><\/dd>\n<dt id=\"is%20it%20lightweight%3F\"><h3>Is it lightweight?<\/h3><\/dt>\n<dd><p>Yes, it's designed with performance in mind. It uses efficient database queries and transient caching for aggregate counts to minimize server load.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.23.1 - 20\/05\/2026<\/h4>\n\n<ul>\n<li><strong>New Feature:<\/strong> Added a modern Gutenberg block to display post views.<\/li>\n<li><strong>Documentation:<\/strong> Launched new documentation site using VitePress.<\/li>\n<li><strong>Workflow:<\/strong> Updated GitHub Actions for automated building and WordPress.org asset deployment.<\/li>\n<li><strong>Assets:<\/strong> Added dedicated assets for the WordPress.org plugin page.<\/li>\n<li><strong>Testing:<\/strong> Expanded PHPUnit test suite to include Gutenberg block rendering.<\/li>\n<\/ul>\n\n<h4>1.22.0 - 15\/12\/2025<\/h4>\n\n<ul>\n<li>Added PHPUnit testing framework, Composer dependencies, and GitHub Actions for CI.<\/li>\n<\/ul>\n\n<h4>1.21.0 - 26\/09\/2025<\/h4>\n\n<ul>\n<li>Version updates<\/li>\n<\/ul>\n\n<h4>1.18.0 - 16\/12\/2024<\/h4>\n\n<ul>\n<li>Removed Home page checks from Ajax.<\/li>\n<li>Now home page views will be counted<\/li>\n<\/ul>\n\n<h4>1.17.0 - 30\/11\/2024<\/h4>\n\n<ul>\n<li>Complete architecture Changed on How we count views.<\/li>\n<li>we are using simple Js insted of AJAX.<\/li>\n<\/ul>","raw_excerpt":"WP Post Views is a lightweight and efficient plugin to track and display post views in WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/116689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=116689"}],"author":[{"embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/vanpariyar"}],"wp:attachment":[{"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=116689"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=116689"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=116689"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=116689"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=116689"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ltz.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=116689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}