Skip to content

Recently Viewed (VX)

Shows visitors the posts they've looked at recently — a low-effort way to help people get back to a listing they saw earlier.

Tracking works for everyone: logged-in users have their history stored in user meta, so it follows them across devices, while guests are tracked in localStorage in their own browser.

Enable it under Voxel Toolkit → Widgets.

Guest history is per-browser

A guest's list lives in their browser only. It won't survive clearing site data, and doesn't carry to another device. If someone logs in later, treat the two histories as separate.

Content

ControlPurpose
TitleHeading above the list
Title HTML TagWhich heading level to render
Post TypeWhich Voxel post type to track and show
Max PostsHow many recent posts to display
ColumnsGrid columns
GapSpacing between cards
Show Clear LinkLet the visitor clear their own history
Clear Link TextLabel for that link

Keep Max Posts small

Four to six is usually right. This is a convenience shortcut, not a browsing interface — a long list competes with your actual search and takes over the page.

Show Clear Link is worth enabling. It's a small privacy courtesy on a shared or public computer, and it costs nothing.

Where to place it

  • A sidebar or footer on archive and single-post templates, where it's useful without being intrusive
  • The account dashboard, as a "pick up where you left off" section
  • Not the homepage for first-time visitors — it renders empty until someone has viewed something

Styling

Elementor controls for the header — bottom spacing, vertical alignment — and the title's colour and margin, plus the card grid.

Troubleshooting

The widget is empty

Expected until the visitor has viewed a post of the selected type. Test by visiting a couple of posts, then returning to the page with the widget.

It stays empty after viewing posts

  • Confirm Post Type matches the posts being viewed — it tracks one type
  • For guests, confirm the browser allows localStorage; private windows and strict privacy settings can block it
  • Confirm a page cache isn't serving a cached copy of the widget to every visitor

History doesn't follow a user between devices

Only logged-in users get cross-device history, via user meta. Anything viewed while logged out stays in that browser.

Cleared history comes back

Clearing removes the stored list, but viewing posts again rebuilds it — that's the intended behaviour, not a bug.

Built by Code Wattz.