Lazy Load for Private Messages in Wordpress-based System

Заказчик: AI | Опубликовано: 09.12.2025
Бюджет: 25 $

Our WordPress-based CMS already runs a busy adults-only social platform with user profiles and a private messaging system. Right now the inbox drops every visitor to the newest reply via a “scroll to bottom” link, but the full thread then loads at once—huge chains can be slow and unwieldy. Users complain about it now and then. I want to swap that all-at-once load for true lazy loading, mimicking Telegram or X: show only the most recent 15-25 messages on first view, then—when the user scrolls upward—automatically fetch the next 15-25, repeating in similar blocks until the start of the conversation appears. No button, no spinner or progress bar; the additional messages should simply appear as the scroll position reaches the top of what is currently rendered. I want this to be smooth and elegant—no rough and choppy effects/functions. Smooth, buttery experiences are important to me. The job is to code, integrate, and test this behavior inside the existing PM PHP template, keeping styling and database structure intact. Please make sure the new logic: • plays nicely with the current “scroll to bottom” shortcut • respects typical mobile and desktop breakpoints • avoids extra HTTP calls or DOM thrashing by batching queries efficiently • is fully compatible with the site’s current WordPress version and any major messaging plug-ins in use Deliver the rewritten template or plug-in module, any enqueue scripts or CSS tweaks, and brief setup notes so I can deploy to staging first. Once everything loads smoothly and pagination feels seamless, the task is done.