Main Features
- Remembers reading position using localStorage for guests.
- Saves reading position to user_meta per device for logged-in users (PC, Mobile, Tablet…).
- Automatically scrolls back to the last read position on reload or return.
- Choose which post types are enabled via settings panel.
- No tables, no tracking, no bloat – fully clean and safe.
- No jQuery used, written in modern Vanilla JS.
- Supports
init_plugin_suite_reading_position_delayfilter to customize debounce delay before saving.
For both guests and logged-in users
- Guests’ reading positions are saved via browser localStorage.
- Logged-in users’ positions are saved in user_meta per post and per device, ensuring each device remembers its own state.
Easy Customization
- You can choose which post types enable the reading position feature.
- Supports filters for developers to modify saving delay or logic based on post ID.
Quick Setup
- Download the plugin and extract it into
/wp-content/plugins/ - Activate it via the Plugins menu in WP admin
- Configure supported post types in Settings → Reading Position
- Done – it runs automatically, no shortcode or block needed.
Performance & Compatibility
- Compatible with WordPress 5.5 and above
- Requires PHP 7.4+
- Theme-independent – works with any modern theme
- Highly optimized code, no slowdown even on long posts
For Developers
- Filter
init_plugin_suite_reading_position_delayto customize debounce time - Filter
init_plugin_suite_reading_position_meta_keyto change the meta key name - Filter
init_plugin_suite_reading_position_data_to_storeto modify saved content - Filter
init_plugin_suite_reading_position_should_deleteto decide whether to delete saved position - Filter
init_plugin_suite_reading_position_localized_datato inject extra data into frontend JS
Examples using advanced filters:
// Change debounce time (default: 1000ms)
add_filter('init_plugin_suite_reading_position_delay', fn() => 2000); // 2 seconds
// Customize meta_key used for storing position
add_filter('init_plugin_suite_reading_position_meta_key', function ($key, $post_id, $device) {
return "_custom_rp_{$post_id}_{$device}"; // Example: _custom_rp_123_PC
}, 10, 3);
// Modify data stored to user_meta (default includes scrollTop, percent, screenHeight, updated)
add_filter('init_plugin_suite_reading_position_data_to_store', function ($data, $post_id, $device, $user_id) {
$data['ip'] = $_SERVER['REMOTE_ADDR'] ?? ''; // Optionally store user IP
return $data;
}, 10, 4);
// Prevent deletion of saved position when user reaches end
add_filter('init_plugin_suite_reading_position_should_delete', fn($yes) => false); // Keep it for next session
// Inject debug mode into JS
add_filter('init_plugin_suite_reading_position_localized_data', function ($data, $post_id) {
$data['debug'] = current_user_can('manage_options'); // Add debug flag for admins
return $data;
});
Get Started
Whether you’re running a blog, novel site, magazine or long-form content hub, Init Reading Position delivers a smooth and smart reading experience – lightweight, intelligent, and fully automatic.