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
LayoutGrid, or a horizontal slider with navigation arrows
ColumnsGrid columns — responsive, and ignored in slider layout
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 style sections for the header (bottom spacing, vertical alignment), the title's colour, typography and margin, the clear link across normal and hover, and the empty-state message.

Slider Navigation ​

Choosing the Slider layout adds a Slider Navigation section for the arrows either side of the strip. It only appears when the layout is set to Slider.

ControlPurpose
Button sizeWidth and height of the round button
Arrow sizeSize of the chevron inside it
Distance from edgeNegative values sit the buttons outside the strip, positive values overlap the cards
Border radiusCorner rounding — drop it to 0 for square buttons
Normal / HoverArrow colour, background, border and shadow for each state

Tooltips at the very edge of a slider

Cards no longer clip their own tooltips, but a slider is a horizontal scroller and has to hide what falls outside it — so a tooltip on the last visible card can still be trimmed at the strip's edge. Grid layout has no such limit.

Hiding it when there's nothing to show ​

Two visibility rules are registered into Voxel's normal Visibility UI:

  • Recently viewed is empty
  • Recently viewed is not empty

Apply either to the widget, a heading beside it, or the whole container, so a first-time visitor doesn't see an empty section. Each rule carries its own post type list, so it can be scoped to the same types the widget shows.

Logged-in visitors only

The rules are evaluated on the server, and a logged-out visitor's history lives only in their browser. For those visitors the rules always read as empty. The widget itself still renders their history client-side.

Alternatively, set No results text in the Style tab to show a message instead. Clear the field to show nothing at all.

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.