Once you’ve setup the styling and content for your widget, you might be wondering how to configure it to display on some pages but not on others. On the contrary, you might want to restrict the widget from displaying to only a few pages. KickoffLabs makes this configuration very simple to manage. Here are the three different behaviors that describe when a widget will be displayed.

Default

The default behavior for a widget is to display or initialize on every page that includes the widget embed code. If you choose to place the widget in a file that will be included on every page of your website, the widget will initialize on every page. This makes it very simple to place the widget embed code in a footer or header file to display on all pages of your website.

Excluding Pages

If you want to exclude certain pages of your website, you can compile a list of “rules” in the Exclude On text box. If a page URL matches the rule you provide, the widget will not display. You are able to enter full URLs or simply provide fragments of the URLs you wish to skip. These are all acceptable exclusion rules:

https://kickofflabs.com/blog/*: Widget will display on all pages with URLs that DO NOT start with https://kickofflabs.com/blog. More information on the wildcard below.

/blog/linkedin-rock-like-pro: Widget will display on all pages with URLs that DO NOT include /blog/linkedin-rock-like-pro

/about.html: Widget will display on all pages with URLs that DO NOT include /about.html

hide show rules

Displaying Only on Specific Pages

You can choose to provide rules that must be met in order for the widget to display. You can compile a list of these rules in the Display Only On text box. These rules are the opposite of exclusion rules in the sense that a page must meet the rules for the widget to display. The same URL rules apply and the following are all acceptable restrictions:

https://kickofflabs.com/blog/*: Widget will display on all pages with URLs that DO start with https://kickofflabs.com/blog. More information on the wildcard below.

/blog/linkedin-rock-like-pro: Widget will display on all pages with URLs that DO include /blog/linkedin-rock-like-pro

/about.html: Widget will display on all pages with URLs that DO include /about.html

show hide rules

 Using Wildcards

You can use an asterisk (*) to signal that part of the URL rule can be changed while still being a positive match. For example:

https://kickofflabs.com/blog/*.html: Will match any URLs within the blog section that have a .html extension

*kickofflabs.com/blog: Will match https://kickofflabs.com, https://kickofflabs.com, https://blog.kickofflabs.com and more.