Message Settings: Conditions
The conditions tab allows you to control where and when a message is shown on your website. When users visit your site, the plugin will check the viewed content against your selection below and determine if this message should be shown.
Ahoy conditions
General
- The Home Page - The message will be shown on your sites homepage.
- A Search Result Page - The message will be shown on search results.
- A 404 Error Page - The message will be shown on 404 error pages.
Posts
- The Blog Index - The message will be shown on the blog index.
- A post - The message will be shown whenever a user visits any post on your site.
- A selected post - The message will be shown whenever a user visits a post that you have selected. You can select multiple posts.
- A post with ID - The message will be shown whenever a user visits a post that has a specific ID. You can specify multiple post IDs.
- A post with category - The message will be shown whenever a user visits a post that has a selected category. You can select multiple categories.
- A post with tag - The message will be shown whenever a user visits a post that has a specific tag. You can select multiple tags.
- A post with format - The message will be shown whenever a user visits a post that has a specific format. You can select multiple formats.
Pages
- A page - The message will be shown whenever a user visits any page on your site.
- A selected page - The message will be shown whenever a user visits a page that you have selected. You can select multiple pages.
- A page with ID - The message will be shown whenever a user visits a page that has a specific ID. You can specify multiple page IDs.
- Pages: Child Of - The message will be shown on pages that are directly children of the chosen page.
- Pages: Ancestor Of - The message will be shown on pages that are ancestors of a chosen page.
- A page with template - The message will be shown whenever a user visits a page that has a specific template. You can specify multiple templates.
Media
- A media - The message will be shown whenever a user views any media on your site
- A selected media - The message will be shown whenever a user views a specific media you have selected.
- A media with ID - The message will be shown whenever a user views a media that has a specific ID. You can specify multiple media IDs.
Custom Post Type
If you have a custom post type on your site, you will be able to apply the same conditions that are available to page/post conditions
Tags
- A tags - The message will be shown whenever a user visits any tag on your site.
- Tags: selected - The message will be shown whenever a user visits a tag that you have selected. You can select multiple tags.
- A tags with ID - The message will be shown whenever a user visits a tag that has a specific ID. You can specify multiple tag IDs.
Categories
- A categories - The message will be shown whenever a user visits any category on your site.
- Categories: selected - The message will be shown whenever a user visits a category that you have selected. You can select multiple categories.
- A categories with ID - The message will be shown whenever a user visits a category that has a specific ID. You can specify multiple category IDs.
User
- Is logged in - The message will only be shown to logged in users
- Has role - The message will only be shown to the role/roles you select
- Has commented - The message will only be shown to users who have commented on your site. You can specify a more than/less than number of comments.
- Has viewed X pages - The message will only be shown to users who have visited at least X pages on your site.
- Has viewed selected pages - The message will only be shown to users who have visited a list of specific pages on your site. No specific order.
- Time on site - The message will only be shown to users who have spent more/less than X minutes on your site
HTML
- HTML element exists - The message will be shown whenever a user visits a page/post that contains an HTML element
- HTML element has class - The message will be shown whenever a user visits a page/post that contains an HTML element with a class
URL
- URL is - The message will be shown whenever a user is on a page/post with the designated URL
- URL contains - The message will be shown whenever a user is on a page with a URL that contains specified text
- URL begins with - The message will be shown whenever a user is on a page with a URL that begins with specified text
- URL ends with - The message will be shown whenever a user is on a page with a URL that ends with specified text
- URL regex search - The message will be shown whenever a user is on a page with a URL that matches a specified regex pattern
- Query argument exists - The message will be shown whenever a user is on a page with a URL that contains specified query argument. In this example ?argument1=value, the argument that exists is "argument1"
- Query argument is - The message will be shown whenever a user is on a page with a URL that contains specified query argument and value. In this example ?argument1=value, the argument is "argument1" and the value would be "value"
Referrer
- Referrer URL is - The message will be shown whenever a user views a page/post on your website and came from another page on your site or another with a specific URL
- Referrer contains - The message will be shown whenever a user is on a page with a referrer that contains specified text
- Referrer URL begins with - The message will be shown whenever a user views a page/post on your website and came from another page on your site or another with a URL that begins with a specified text
- Referrer URL ends with - The message will be shown whenever a user views a page/post on your website and came from another page on your site or another with a URL that ends with a specified text
- Referrer regex search - The message will be shown whenever a user views a page/post on your website and came from another page on your site or another with a URL that matches a custom regex pattern
- Referrer is search engine - The message will be shown whenever a user views a page/post on your website and came from another page on your site or another with a URL that is a known search engine.
- Referrer is external URL - The message will be shown whenever a user arrives on your website from a designated external URL
Cookie
- Cookie exists - The message will be shown whenever a user has a specific cookie set in their browser.
- Cookie is - The message will be shown whenever a user has a specific cookie set in their browser and the value matches your specified value.
Browser
- Is specific browser - The message will only be shown to users who have the selected browser
- Version is - The message will only be shown to users using a specific version of a browser
- Browser width - The message will only be shown to users using a browser within the designated browser size width
- Browser height - The message will only be shown to users using a browser within the designated browser size height
Device
- Device is mobile - The message will only be shown to users using a mobile device
- Device is phone - The message will only be shown to users using a mobile phone
- Device is tablet - The message will only be shown to users using a tablet
- Device is brand - The message will only be shown to users using a device with a specific brand
- Screen width - The message will only be shown to users using a device within the designated screen size width
- Screen height - The message will only be shown to users using a device within the designated screen size height
Custom
- Custom PHP function - The message will be shown whenever a custom PHP function of your choice returns true. Enter the function name without (), such as "my_function_name" or "StaticClass::function_name".
- Custom JS function - The message will be shown whenever a custom JavaScript function of your choice returns true. Enter the function name without (), such as "my_function_name", "window.my_function_name" or "object.function_name".