Master the power of dynamic placeholders to create flexible, automated counter messages
Dynamic placeholders are the secret sauce behind WhoKnew Views™ Pro’s flexible display text system. They automatically update with real data, so you can write one custom message that works perfectly across all products, view counts, and time windows. This technical guide explains how they work, when to use them, and advanced strategies for maximum impact.
💡 Pro Feature: Dynamic placeholders are available exclusively in WhoKnew Views™ Pro. Free users cannot customize display text.
🔑 The Two Core Placeholders
WhoKnew Views™ Pro provides two powerful placeholders that automatically populate with current data:
📊 #views# Placeholder
What it does: Replaced with the current view count for the product being displayed.
Data source:
- Free users: Shows real views within the view window
- Pro users (padding disabled): Shows real views within the view window
- Pro users (padding enabled): Shows padded views (real views + padding algorithm)
Format: Displays as a whole number (e.g., 247, 1,523)
Updates: Automatically recalculates on every page load
⏰ #hours# Placeholder
What it does: Replaced with the current view window duration in hours.
Data source: Pulled from the View Window Duration setting on the General tab.
Format: Displays as a whole number (e.g., 24, 48, 168)
Updates: Changes automatically when you adjust your view window setting
⚙️ How Placeholder Replacement Works
Understanding the technical process helps you use placeholders more effectively:
🔧 Behind the Scenes:
- You set display text: Enter your message with placeholders (e.g.,
"🔥 #views# people want this!") - Customer visits product: A shopper loads a product page
- Plugin calculates values: WhoKnew Views™ calculates the current view count and retrieves the view window
- Placeholders are replaced: The plugin uses
str_replace()to swap placeholders with real values - Counter displays: Customer sees the final message (e.g.,
"🔥 247 people want this!")
Key Technical Details:
- ⚡ Real-time replacement: Happens on every page load, ensuring accuracy
- 🔒 Escape-safe: Values are sanitized before display to prevent security issues
- 📱 Works everywhere: Desktop, mobile, live preview—consistent across all views
- ♾️ No caching issues: Replacement happens server-side before caching layers
📝 Placeholder Syntax Rules
Follow these rules to ensure your placeholders work correctly:
✅ Correct Usage:
| Format | Result |
|---|---|
#views# | ✅ Replaced with view count (e.g., 247) |
#hours# | ✅ Replaced with window duration (e.g., 48) |
#views# views in #hours# hours | ✅ Both replaced: 247 views in 48 hours |
🔥 #views# people! | ✅ Works with emojis: 🔥 247 people! |
❌ Incorrect Usage:
| Format | Problem |
|---|---|
#Views# or #VIEWS# | ❌ Case-sensitive! Must be lowercase |
# views # | ❌ No spaces allowed inside placeholders |
##views## | ❌ Only one # on each side |
#view# or #hour# | ❌ Must be plural: #views# and #hours# |
#count# or #time# | ❌ Only #views# and #hours# are supported |
⚠️ Important:
If you use incorrect placeholder syntax, the placeholder won’t be replaced—customers will see the literal text (e.g., “#Views#” instead of “247”). Always use lowercase with no extra spacing!
🎯 Strategic Placeholder Placement
Where you place placeholders in your message affects readability and impact. Here are proven placement strategies:
Strategy 1: Front-Load the Number
Format: Put #views# at the beginning for maximum impact.
#views# people are viewing this→ 247 people are viewing this#views# shoppers love this product!→ 127 shoppers love this product!#views# views in the past #hours# hours→ 523 views in the past 48 hours
✅ Why this works: Numbers are eye-catching. Starting with the view count grabs attention immediately.
Strategy 2: Context-First Messaging
Format: Start with context, then reveal the number.
Popular! #views# recent views→ Popular! 247 recent viewsTrending with #views# views→ Trending with 127 viewsHot item: #views# people interested→ Hot item: 523 people interested
✅ Why this works: Context primes customers to interpret the number favorably.
Strategy 3: Time-Focused Urgency
Format: Emphasize the time window with #hours#.
In the last #hours# hours: #views# views→ In the last 48 hours: 247 views🔥 #views# views in just #hours# hours!→ 🔥 127 views in just 24 hours!Past #hours#h: #views# people interested→ Past 72h: 523 people interested
✅ Why this works: Highlighting the short timeframe creates urgency and FOMO.
Strategy 4: Minimalist Approach
Format: Let the numbers speak for themselves.
#views# views→ 247 views#views# in #hours#h→ 127 in 48h👀 #views#→ 👀 523
✅ Why this works: Clean, minimal design fits luxury brands and modern aesthetics.
🔄 How Placeholders Interact with Other Features
Understanding how placeholders work with Pro features helps you maximize their power:
📊 Number Padding (Pro)
When number padding is enabled, #views# displays padded views (real views + algorithm padding), not raw real views.
📊 Example:
Product has 12 real views. Padding adds 35 views. Customer sees: “47 people are viewing this” (not 12).
⏱️ View Window Changes
When you change your view window duration, #hours# automatically updates across all products.
📊 Example:
You change from 48 hours to 72 hours. Display text "#views# views in #hours# hours" automatically becomes “127 views in 72 hours” (no manual updates needed).
🎨 Per-Product Custom Settings (Pro)
Products with custom settings can have different view windows, so #hours# shows the product-specific window.
📊 Example:
Global default: 48 hours. Product A has custom 24-hour window. Product A displays: “89 views in 24 hours” while others show “127 views in 48 hours”.
🧪 Testing Your Placeholders
Always verify that placeholders are working correctly before going live:
⚙️ Testing Checklist:
- Use Live Preview: Navigate to Styling tab → enable Live Preview → check placeholder replacement
- Test with different view counts: Visit products with low, medium, and high view counts
- Change view window: Adjust from 48h to 72h and verify
#hours#updates - Toggle number padding: Enable/disable padding to see how
#views#changes - Check mobile rendering: Switch preview to Mobile Portrait mode
- Test per-product settings: Create a custom product setting and verify placeholders reflect it
Common Placeholder Issues & Solutions:
| Issue | Solution |
|---|---|
| Placeholder shows as “#views#” literally | Check spelling and case (must be lowercase) |
| Wrong number displayed | Clear browser cache; check if padding is enabled |
| #hours# shows incorrect window | Check per-product custom settings; verify General tab setting |
| Placeholders don’t update after changes | Clear page cache (if using caching plugin); hard refresh browser |
💡 Advanced Placeholder Strategies
Ready to get creative? Try these advanced approaches:
🔥 Conditional Language Based on View Counts
While placeholders don’t support true conditionals, you can craft messages that work across different view count ranges:
🔥 Hot! #views# recent views— “Hot!” stays accurate whether views are 50 or 500Popular with #views# shoppers— “Popular” scales well from low to high counts#views# people interested— Neutral phrasing works for any number
📱 Mobile-Optimized Placeholder Messages
Use shorter text with placeholders for mobile devices:
- Desktop:
#views# people viewed this in #hours# hours - Mobile: Consider
#views# views(shorter, still effective)
💡 Note: WhoKnew Views™ doesn’t have separate mobile/desktop display text fields. Choose one message that works well on both, or keep it short for optimal mobile display.
🌐 Multilingual Placeholder Usage
Placeholders work perfectly with multilingual text if you manually set your display text to match your store’s language:
- French:
#views# vues en #hours# heures - Spanish:
#views# visualizaciones en #hours# horas - German:
#views# Ansichten in #hours# Stunden
🌐 Multilingual Stores:
WhoKnew Views™ uses one display text setting for all customers. If you run a multilingual store, set the text to your primary language or use minimal formatting like #views# | #hours#h that works across languages. For more details, see the article: “Multilingual Display Text.”
✅ Placeholder Reference Card
🔑 Quick Reference:
| Available Placeholders: | #views# and #hours# |
| Case Sensitivity: | Must be lowercase |
| Spacing: | No spaces inside placeholders |
| Format: | One # on each side |
| Updates: | Automatic on every page load |
| Works With: | Emojis, punctuation, multilingual text |
| Version Required: | WhoKnew Views™ Pro |
Dynamic placeholders are simple in concept but powerful in execution. Master these two placeholders, and you’ll create display text that automatically scales with your store, adapts to setting changes, and delivers consistent social proof across every product.
🚀 Ready to Experiment? Head to WhoKnew → WhoKnew Views → General tab and try different placeholder combinations. Use the Live Preview in the Styling tab to see your changes instantly!