Skip to content
All articles

Product guides

Placing a bar inside your page instead of the top

How to render a countdown or orders bar inside a specific element on your page by id, what happens when the element is missing, and when inline beats the top.

Provedly team··5 min read

To place a bar inside your page instead of across the top, set its position to inline and give it the id of an element on your page, for example promo-bar. Then add <div id="promo-bar"></div> where the bar should appear: above the product price, under a hero image, inside a pricing table. The bar renders inside that element. Pages that do not have the element do not show the bar at all, which makes the element itself a simple way to choose pages.

This guide covers the setup, the rules for the id, what happens on pages built with JavaScript, and when inline is the better choice.

The four positions

A bar can sit in one of four places:

Position What it does Good for
Sticky top Fixed to the top of the window while scrolling Site-wide sales
Top of page, in flow First thing on the page, scrolls away Announcements that should not follow the reader
Fixed bottom Fixed to the bottom of the window Mobile-heavy stores where the top is crowded
Inline, inside your page Inside an element you choose A deadline or count next to the thing it is about

The first three compete with your header, cookie banner and any chat widget. Inline sits in your layout like any other block, so it does not cover anything.

Setting it up

  1. Open the bar and set Position to Inline, inside your page.
  2. In Show inside the element with id, type an id such as promo-bar. A leading # is removed for you.
  3. Add an empty element with that id to your page, where the bar should appear:
<div id="promo-bar"></div>
  1. Keep the site snippet (or the bar's own snippet) on the page as usual. The bar finds the element and renders inside it.

Where to add the element depends on your platform:

Platform Where to put the element
Plain HTML In the page template, where the bar should sit
WordPress A Custom HTML block in the editor, or your theme template
Webflow, Framer, other builders An embed or custom code element
React, Next.js, Vue A <div id="promo-bar" /> in the component

If you leave the id empty, an inline bar renders where its snippet is pasted. That works when you paste the bar's own snippet into the page body. With one site-wide snippet in the footer, use an id so the bar lands where you want it.

Rules for the id:

  • It must start with a letter, and can contain letters, numbers, hyphens, underscores, colons and dots. promo-bar, bf_countdown and pricing.deadline are fine.
  • It should be unique on the page. If two elements share the id, the bar uses the first one.
  • Use an empty element. The bar is added inside it, so anything already there stays above the bar.

When the element is missing

Some sites add their content after the page loads: single-page apps, page builders and themes that render sections with scripts. If the element is not there yet when the bar loads, the bar waits for it for up to 5 seconds and renders as soon as it appears.

If the element still does not exist after that, the bar stays hidden on that page and a short warning is written to the browser console naming the missing id. It never falls back to the top of the page. A bar that shows in a place you did not design for is worse than no bar.

The element doubles as page targeting. Because a missing element means no bar, the element doubles as targeting. Put <div id="bf-deadline"></div> only in your Black Friday collection template and the bar appears only there.

You can still combine it with the bar's page targeting (all pages, only these, or all except, with wildcards) and device targeting. Both have to allow the page, and the element has to exist.

When inline is the better choice

A deadline next to the offer. A countdown inside the product section, right above the price, reads as a fact about that product: "This price ends Monday 11:59 PM ET". At the top of the page it reads as a general site message.

Pricing pages. A real orders bar inside a pricing table ("18 orders in the last 7 days") sits where the decision is made. See social proof on a pricing page.

Long landing pages. A bar in the middle, after the explanation and before the call to action, catches readers who scrolled past the header.

Crowded headers. If you already have a navigation bar, a shipping notice and a cookie banner, a fourth strip at the top pushes your content down. Inline gives the timer a place without stacking.

Inline is the wrong choice for a message that should follow the shopper everywhere, like a site-wide sale ending tonight. Use sticky top for that.

Everything else still applies. An inline bar is the same bar in a different place. The countdown counts to the same fixed date and timezone for everyone. At zero it can hide, keep a finish message or redirect its button. The email countdown GIF reads the same deadline. The bar tracks views and clicks, and its rule is listed on your verification page.

Doing this with Provedly

Inline placement is available for every bar type on every plan. On any site that uses the site snippet, the WordPress plugin or a bar snippet, the id field appears under Position once you pick inline. The Shopify app loads bars through the theme app embed and does not offer the element id field, so on Shopify the top and bottom positions are the practical choice.

Frequently asked questions

Can I show the same bar in two places on one page?

No. The bar renders once, inside the first element with the id. If you need two placements, duplicate the bar and give the copy a different id. Note that a copy is a second bar on your plan.

Does an inline bar push my content down?

Yes, like any block in your layout, which is usually what you want. It does not cover content, and visitors can close it if you leave the close button on.

Why is my inline bar not showing?

Check the browser console for the missing-id warning, then check that the id on the page matches exactly, including case. After that, check page and device targeting and that the site snippet is on the page.

Put a deadline exactly where it belongs: create a free account.

cta barscountdown timerplacementtutorial

Get new articles by email

Honest social proof, verified purchases and what actually moves conversion. A few emails a month at most; leave with one click.

We email you once to confirm. Your address is used only for this newsletter; see the privacy policy.

Show proof you can stand behind.

Free plan, one site, 2,000 impressions a month, verified purchases included. The badge on the free plan links to your verification page, which is the point.