Lightweight and efficient post views counter for WordPress.
- Gutenberg Block: Easily display post views using the dedicated "Post Views" block.
- Shortcodes: Support for
[WPPV-TOTAL-VIEWS]and[WPPV-TOTAL-VIEWS-PER-POST-TYPE]. - IP Filtering: Option to filter views by IP address for more accurate counts.
- Custom Post Types: Support for tracking views on posts, pages, and custom post types.
- Admin Column: View count column in the WordPress admin post list.
- Performance Optimized: Uses transients for total counts and efficient database queries.
- Developer Friendly: Clean code with PHPUnit tests and GitHub Actions CI.
Full documentation is available at https://vanpariyar.github.io/wp-post-views/
- Upload the plugin to your
/wp-content/plugins/directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Configure settings under Settings > WP Post Views.
This plugin is developed with modern tools:
- Gutenberg Block: Built with
@wordpress/scripts. - Testing: PHPUnit for PHP and Linting for JS/CSS.
- CI/CD: GitHub Actions for automated testing and deployment to WordPress.org.
git clone https://github.com/vanpariyar/wp-post-views.git
cd wp-post-views
npm install
npm run buildOriginally created by Ronak J Vanpariya. Special thanks to AnkitaTanti for original contributions.
GPL-2.0-or-later