The best way to keep a WordPress travel blog table of contents visible is to make the TOC block sticky with the Sticky Menu (or Anything!) on Scroll plugin. Long destination guides often run past 3,000 words, and mobile traffic now makes up more than 60% of global web traffic [source: StatCounter]. A fixed table of contents helps readers jump from โWhere to stayโ to โDay tripsโ without endless scrolling.
TLDR: A travel blogger can keep a WordPress table of contents visible by assigning it a CSS class or ID, then using Sticky Menu (or Anything!) on Scroll to pin it while readers scroll. For example, a 4,500-word Paris guide with 12 sections could keep hotel tips, transport advice, and food stops one click away. If readers spend 18 seconds hunting for a section, a sticky TOC may cut that to around 6 seconds. That is a small fix with a real effect on patience.
Why a Sticky TOC Works So Well for Travel Guides
Travel posts are rarely short. A serious destination guide may include flights, hotels, maps, restaurant picks, safety notes, costs, day trips, and packing tips. It gets annoying when a reader has to scroll for what feels like forever just to find โbest time to visit.โ
A visible TOC acts like a mini control panel. The reader stays in the guide, not lost inside it. For bloggers, that can mean better time on page, cleaner reading flow, and fewer quick exits.
Step 1: Create a Clean Table of Contents
The plugin does not create the TOC. It makes an existing item stick. So the blogger first needs a TOC block, widget, shortcode, or hand-built list of anchor links.
A simple TOC may look like this:
Each heading in the guide needs a matching anchor ID. Most block editors allow this under the โAdvancedโ panel. The TOC should be short. Twelve links are fine. Thirty links feel like a tax form.
Step 2: Add a CSS Class or ID to the TOC
Sticky Menu (or Anything!) on Scroll needs a selector. That is how it knows which item to pin.
The blogger can wrap the TOC in a group block and give it a class such as:
travel-toc
Or use an ID such as:
destination-toc
A class is usually better if the same layout appears across many guides. An ID is fine for one special guide.
Step 3: Set the Sticky Element in the Plugin
After installing and activating the plugin, the blogger goes to the plugin settings and enters the selector.
- For a class, enter
.travel-toc - For an ID, enter
#destination-toc
The dot matters for classes. The hash mark matters for IDs. This tiny detail causes a lot of wasted time. Honestly, it feels like the kind of setting that should warn users before they save nothing useful.
Once saved, the TOC should remain visible while the guide scrolls. If it does not, the theme may be blocking it with a parent container, overflow rule, or sidebar layout.
Step 4: Adjust the Top Offset
Many WordPress sites already have a sticky header. If the TOC sticks at the very top, it may hide under the header. That looks broken.
The fix is the pluginโs top offset setting. If the header is 80 pixels tall, the blogger can set the offset to 90 or 100 pixels. That gives the TOC breathing room.
On logged-in WordPress views, the admin bar can also change spacing. Bloggers should test while logged out or in a private browser window. That is what real readers see.
Step 5: Decide Where It Should Stick
A TOC can sit in a sidebar on desktop. On mobile, it often works better as a compact box near the top of the article. A full sticky sidebar on a phone can eat too much screen space.
Good travel blog setups often use:
- Desktop: sticky TOC in the right sidebar
- Tablet: smaller sticky TOC above the article
- Mobile: collapsible TOC or non-sticky TOC
The plugin includes options to limit sticky behavior by screen size. That matters. A sticky item that feels helpful on a laptop can feel pushy on a phone.
Step 6: Watch for Overlap and Z-Index Problems
Sometimes the sticky TOC slides under images, ads, cookie banners, or a newsletter box. This is usually a z-index issue.
The blogger can fix it with simple CSS:
.travel-toc { z-index: 999; }
Still, bigger is not always better. A TOC should not cover booking buttons, maps, or affiliate boxes. If the blog also uses strong first-screen messaging, the same plain layout rules used in clear page messaging apply here: make the next step obvious, not loud.
Step 7: Test the Guide Like a Reader
The final test is simple. The blogger opens the destination guide on desktop, tablet, and phone. Then they jump between sections, scroll fast, click links, and check whether the TOC gets in the way.
They should test common travel content too. Maps, hotel boxes, image galleries, and embedded transport tips can change spacing. A guide that includes mobile route help, such as Google Maps sound fixes, may include embeds or screenshots that need extra room.
Best Practices for a Sticky Travel TOC
- Keep link labels short. โFoodโ is better than โThe absolute best meals to try.โ
- Use clear heading IDs. They help editing and tracking.
- Do not pin huge boxes. Sticky clutter feels rude.
- Check keyboard access. Readers should be able to tab through links.
- Avoid covering ads or forms. It can hurt clicks and trust.
FAQ
Can Sticky Menu (or Anything!) on Scroll make any TOC sticky?
Yes. It can make almost any visible WordPress element sticky if that element has a usable CSS class or ID.
Does it work with TOC plugins?
Usually, yes. The blogger needs to inspect the TOC block and copy the correct selector into the plugin settings.
Should the TOC be sticky on mobile?
Not always. A small collapsible TOC is often better. A large sticky box can block too much of the article.
Why does the sticky TOC hide under the header?
The top offset is too small. Increasing it by 10 to 30 pixels usually fixes the issue.
Is a sticky TOC good for SEO?
It can support better user behavior. It makes long guides easier to read, which may help engagement signals such as time on page and lower pogo-sticking.