Back

VibeFox Text Messages — Help

Requirements

WordPress: 5.8 or later.

PHP: 8.0 or later.

WooCommerce (optional): for the WooCommerce hooks, conditions and template variables.

VibeFox license key: bought on vibefox.net. One key works on one domain.

Installation

1. In WordPress go to Plugins > Add New > Upload Plugin, choose the plugin ZIP file and click Install Now. You can also upload the vf_text_messages folder to /wp-content/plugins/ by FTP.

2. Click Activate. WordPress opens VF Text Messages > Settings > License. Paste your VibeFox license key into License key and click Activate. Until the key is active the plugin stays switched off and its menu shows only Settings (see License key).

3. The menu VF Text Messages appears in the WordPress admin with the pages All Messages, Add Message, Categories and Settings.

4. Open VF Text Messages > Add Message, write the text, choose Hook, Shortcode, Auto (Notification Bar) or PHP code, add conditions if needed and click Publish.

5. Optional: adjust the global style, WooCommerce, analytics and logging in VF Text Messages > Settings.

Creating a message

The message editor has the text field and these boxes:

Message Type & Settings

Message Type:

Hook: any WordPress or WooCommerce action. Hook Name: start typing to pick a popular hook (top of the page, page footer, before or after the post content, posts loop, comment form, widget areas, navigation menus, shop, product page, cart, checkout, order received page, My Account), or enter any action hook of your theme. Hook Priority: lower runs earlier, default 10. Insert (the_content): After the content or Before the content, used for the filter hooks the_content and wp_nav_menu_items.
Shortcode: place [vf_tm] in a post, page, widget or template, or add the Text Message block. [vf_tm] without attributes shows all active messages of this type.
Auto (Notification Bar): the top or bottom of the page or content.
PHP code: only where a theme or plugin calls vf_tm_display(). The message is not shown by hooks, bars, [vf_tm] or the block. The box shows the code to copy: PHP (by ID) and PHP (by slug). Options: Show a close button and Remember Close (Days) (0 = until the browser is closed).

For Auto messages: Position (Top of Page (bar), Bottom of Page (bar), Top of Content, Bottom of Content), Sticky (stays visible on scroll), Show a close button, Remember Close (Days) (0 = until the browser is closed), Delay (Seconds) (0 = show immediately), Animation (Fade, Slide Down, Slide Up, None) and Z-Index.

Display Conditions

No conditions means the message is shown everywhere its type places it. Click Add Condition Group. "Show if" groups must all match (AND); inside a group any condition may match (OR). A matching "Hide if" condition always hides the message. Conditions:

Pages: All Pages, Front Page, Blog Page, Specific Pages (page IDs), Specific Posts (post IDs), Post Type, Post Category, Post Tag, Archive Pages, Search Page, 404 Page, URL Contains (text or a regex such as #^/shop/#), URL Parameter (key=value or just key), Language (language codes).
Users: All Users, Logged In, Logged Out (Guests), User Role, Specific User, New Visitor, Returning Visitor.
Date/Time: Date From, Date To (YYYY-MM-DD), Days of Week (mon,tue,… or 1-7), Time From, Time To (HH:MM, site time zone).
Device: All Devices, Desktop, Mobile (phones and tablets), Tablet.
WooCommerce: Shop Page, Product Category Page, Product Page (Any), Specific Product, Product in Category, Product with Tag, Product On Sale, Product Out of Stock, Cart Page, Cart is Empty, Cart is Not Empty, Cart Total Greater Than, Cart Total Less Than, Cart Count Greater Than, Cart Count Less Than, Specific Product in Cart, Checkout Page, My Account Page, Thank You Page.
Referrer: Direct Visit, From Search Engine, From Social Media, Referrer Domain, UTM Source, UTM Medium, UTM Campaign.

Style & Appearance

A live Preview shows the message. Style: Info (Blue), Success (Green), Warning (Orange), Error (Red), Neutral (Gray), Promo (Purple) or a custom style with Background Color, Text Color, Border Color, Border Width (px), Border Radius (px) and Padding. Icon: No Icon, Info, Success, Warning, Error, Megaphone, Gift, Truck (Delivery) or Clock. CSS Class and Custom CSS (CSS declarations for this message, for example font-weight: 600; text-align: center;).

Schedule

Start Date, End Date, the days of the week (none means every day), Time Start and Time End in the site time zone. A time range like 22:00 – 06:00 spans midnight. Max Views per Visitor (0 = unlimited, counted per browser) and Max Total Views (0 = unlimited; needs Statistics on).

Statistics

Views, clicks and closes, and views for 30 days.

Shortcode

The box of the saved message shows the shortcode, the category shortcode, the PHP code by ID and by slug and the PHP code of the category, each with Copy to Clipboard. For a PHP code message the shortcodes are hidden. Slug: the name used by vf_tm_display( 'slug' ); it stays the same when the message gets another ID, for example after an import to another site. PHP: how to use opens ready examples with a Copy button.

Template variables

{site_name}, {site_url}, {current_url}, {current_date}, {current_time}, {current_year}, {user_name}, {user_email}, {user_first_name}, {user_last_name}, {user_role} and, with WooCommerce, {product_name}, {product_price}, {product_sale_price}, {product_sku}, {product_stock}, {product_category}, {cart_total}, {cart_count}, {cart_subtotal}, {free_shipping_remaining}, {currency} and {shop_url}. When WooCommerce data is missing, the variable stays empty.

Messages list

VF Text Messages > All Messages lists the messages with active switch, type, status (Active, Scheduled, Inactive, Expired, From date), conditions, views, clicks, order and the shortcode (click to copy). Filters by type, category and dates. Actions: activate or deactivate, Duplicate, Delete, and in the Trash Restore and Delete Permanently. Categories groups messages, for example for [vf_tm category="sale"].

Configuration

General settings are on VF Text Messages > Settings. The sections are listed on the left. Click Save Changes to save. Import / Export exports and imports messages as JSON.

General

Enable Messages: master switch. When off, no message, CSS or JavaScript of this plugin is output on the site. Default: on.

Default Style: the style preselected for new messages. Default: Info (Blue).

Font Size: the font size of all messages, for example 14px, 0.875rem or 1em. Empty means 14px.

Custom CSS: extra CSS for all messages, loaded only on pages that show a message. Selectors: .vf-tm-message (every message), .vf-tm-notification-bar (bars), .vf-tm-message-123 (one message).

WooCommerce (shown when WooCommerce is active)

WooCommerce Integration: WooCommerce conditions, WooCommerce hooks in the hook list and the product and cart variables. When off, WooCommerce conditions are ignored and the variables stay empty. Default: on.

Free Shipping Threshold: the cart subtotal that qualifies for free shipping, used by {free_shipping_remaining}. 0 uses the Minimum order amount of the WooCommerce Free shipping method. Default: 0.

Conditions

Device Conditions: evaluates Desktop, Mobile and Tablet conditions by User-Agent. Turn off when a page cache serves the same HTML to all devices; device rules are then ignored. Default: on.

Referrer & UTM Conditions: evaluates Direct visit, Search engine, Social media, Referrer domain and UTM conditions. When off, these rules are ignored. Default: on.

Cache Active Messages: keeps the list of active messages in a transient, cleared automatically when a message is saved, trashed or imported. Default: on.

Cache Lifetime (seconds): 0 disables the cache. Default: 3600.

Analytics

Statistics: counts views, clicks (links and buttons inside a message) and closes. Required for Max Total Views. Default: on.

Count Views via AJAX: the browser reports a view once the message is actually visible, which works with page caching. When off, a view is counted when the server renders the message. Default: on.

Cron

Keep Statistics (days): daily statistics older than this are deleted once a day by WP-Cron. 0 = keep forever. Default: 90.

Statistics Cleanup Schedule: the next and last run of the clean-up.

Logging

Enable Logging: writes events (import and export, statistics clean-up, errors) to a protected log file. Default: off.

Log Level: Info (all messages), Warning (warnings and errors) or Error (errors only) (default).

Max Log Size (MB): when the file reaches this size, only its last 1 MB is kept. Default: 5.

Log File: the log viewer.

Uninstall & Clear

Delete All Data on Uninstall: when the plugin is deleted on the Plugins screen, all messages, categories, statistics, settings and the log are removed. Deactivation never deletes data. Default: off.

Data Cleanup:

Delete All Messages: permanently deletes all saved messages, including drafts and messages in the Trash.
Delete All Message Categories: messages are kept.
Delete Statistics History: deletes recorded views, clicks and closes. Messages with a maximum view count begin counting again.
Clear Log and Clear Active Messages Cache.

Status

The current and minimum versions of PHP, WordPress and WooCommerce and the detected multilingual plugin.

Shortcodes, block and PHP

[vf_tm id="123"]: one message.
[vf_tm category="sale"]: active messages of a category.
[vf_tm]: all active shortcode messages.
Text Message block: the same in the block editor.

Attributes: class (CSS class of the wrapper), style (info, success, warning, error, neutral, promo, or inline CSS of the wrapper), wrap (div, span, p or none), limit (how many messages of a list) and order (menu_order, date, title or random). Example: [vf_tm category="sale" limit="2" order="date"]. The shortcode and the block never show messages of the type PHP code.

PHP functions

Put the code into a theme template (header.php, single.php, a WooCommerce template) or your own plugin. The functions are global, without a namespace. Messages are found by ID or by slug.

vf_tm_display( 123 ) or vf_tm_display( 'free-shipping' ): prints one message of any type.
vf_tm_get( 123 ): returns the same HTML as a string, without printing it.
vf_tm_display_category( 'sale' ) and vf_tm_get_category( 'sale' ): all active messages of a category, like [vf_tm category="sale"].
vf_tm_display_all() and vf_tm_get_all(): all active messages of the type PHP code.
do_action( 'vf_tm_display', 123 ): prints the message without a function_exists check; nothing happens when the plugin is off. The actions vf_tm_display_category and vf_tm_display_all work the same way.

The second argument takes the shortcode attributes as an array, for example vf_tm_display( 123, array( 'style' => 'warning', 'wrap' => 'none' ) ) or vf_tm_display_category( 'sale', array( 'limit' => 2 ) ). To keep the theme working when the plugin is off, check first: if ( function_exists( 'vf_tm_display' ) ) { vf_tm_display( 123 ); }.

Conditions, schedule, view limits, the close state and the language of the visitor always apply; when the message is hidden nothing is printed. Views, clicks and closes are counted as for other messages. The CSS and JavaScript of the plugin are loaded automatically. Developers can change the output with the filter vf_tm_php_output. vf_tm_get_messages() and vf_tm_check_conditions() are also available.

Conditions and schedule apply everywhere.

How it works

On each page the plugin checks which active messages match their conditions, schedule and view limits and prints them in their hook, shortcode or position. A hook message appears only if the theme runs that hook on the page; a PHP code message only where the theme or plugin calls its function. Links and buttons inside a message count as clicks. A closed bar stays hidden for the Remember Close days.

Conditions are evaluated on the server. With page caching, exclude pages with visitor-specific conditions (user, cart, device, referrer) from the cache, or turn off the device and referrer conditions in the settings.

Multilingual: with qTranslate-XT use the language switcher in the message editor; with WPML or Polylang translate the message post.

Messages are boxes and bars; the plugin has no popups.

License key

VibeFox license key: bought on vibefox.net. One key works on one domain.

The plugin works only with an activated key. Without it the plugin is switched off: its features, shortcodes, blocks, admin pages, scheduled tasks and e-mails do not run, and its menu shows only Settings with the License tab. Your settings and data are kept and come back as soon as a key is activated. Right after you activate the plugin in Plugins, WordPress opens this tab.

Open VF Text Messages > Settings > License, paste the key into License key and click Activate. The plugin switches on at once (the page reloads). The block License — VibeFox Text Messages then shows the masked key, the status Active until with the date and the domain, the buttons Check now, Change key, Remove key and the link Manage licenses and domains in your account.

Messages under the field: The key looks incomplete — copy the whole key from your account. (nothing is sent), Key not found. Check that you copied the whole key from your account., This key belongs to another product. (use the key bought for VibeFox Text Messages) and Domain limit reached (free a slot for this domain in your account, then click Check now). After the site address changes, click Check now.

An expired license keeps the plugin working, but without updates and support. Remove key switches the plugin off on this site; the domain slot is freed only in your vibefox.net account. If the license server cannot be reached, the plugin keeps working on the last known status. When the plugin is deleted, the key and its status are always removed.

Troubleshooting

The plugin menu shows only Settings: the license key is not active. Open VF Text Messages > Settings > License and click Activate (or Check now if a key is already entered); the messages under the field are explained in License key.

My message does not appear: check that it is published and active, Enable Messages is on, the schedule (Status column), the conditions and the view limits. A hook message only appears if the theme runs that hook on the page. A closed bar stays hidden for the Remember Close days.

A PHP code message does not appear: check that the template with vf_tm_display() is used on that page, that the ID or slug is correct (see the Shortcode box) and that the message passes its conditions. The shortcode and the block do not show PHP code messages; use the PHP function or change the type.

Device or referrer conditions do not work with a page cache: exclude such pages from the cache, or turn off Device Conditions and Referrer & UTM Conditions.

Show a message only once per visitor: set Max Views per Visitor to 1, or make the bar closeable with Remember Close.

{free_shipping_remaining} is empty: set Free Shipping Threshold or add a Free shipping method with a minimum order amount.

For developers: add your own variables with the filter vf_tm_template_variables.

Uninstall

Deactivating the plugin keeps all data. To remove it, deactivate and delete it on the Plugins page. Messages, categories, statistics, settings and the log are removed only if Delete All Data on Uninstall was on. The license key and license status of this plugin are always removed. The domain slot is freed only in your vibefox.net account.

Bug Report

Thank you for helping us improve. We carefully review every report, but we do not reply to them individually. If your report leads to a change, it will be listed in the product changelog together with the report number. To discuss something in detail, please open a support ticket.

Slide to fit the puzzle