Advanced options
Custom selector for mid-article unit
PrerequisitesRequires a basic understanding of CSS.
To target a custom selector (in place of paragraph):
- Select
Taboolain the sidebar menu (left) to open your Taboola plugin settings. - Select
Other - Fill in a selector (right) and an occurrence (left).
You must identify a CSS selector that works consistently across all your articles.
For example, to target the 2nd
figureelement, fill in:
figureunderCSS selector(right)2underoccurrence(left)
Supported CSS selectors
- HTML element - e.g.
figure. - Unique ID - e.g.
#my-id.- Note the leading hash character (
#).
- Note the leading hash character (
- Class - e.g.
.my-class.- Note the leading period (
.). - You can apply a single class only. For example, the following will fail:
.my-class-1.my-class-2
- Note the leading period (
- Combined HTML element and class - e.g.
figure.my-class.- You can apply a single class only. For example, the following will fail:
figure.my-class-1.my-class-2
- You can apply a single class only. For example, the following will fail:
General guidelines
Always make sure to fill in the relevant occurrence (left). For example, for a unique ID, fill in 1 (the first occurrence).
Homepage (aka Front Page) unit
Which homepage?
- The homepage unit will be applied to your static homepage.
- Under
Pages, your static homepage is labelled asFront Page.- You can assign a static homepage under
Settings > Reading Settings.
PrerequisitesRequires a strong understanding of CSS.
To apply a homepage unit:
- Select
Taboolain the sidebar menu (left) to open your Taboola plugin settings. - Click on
Show advanced Settings(bottom, left) to view the the homepage settings. - Enable the homepage section, using the toggle switch (top, right).
- Fill in the unit settings:
-
Mode (aka Widget ID):
- Fill in the
mode, as provided by Taboola. - The
modedetermines the layout of your homepage unit.
- Fill in the
-
Placement Name:
- Fill in the
placement, as provided by Taboola. - The placement name displays in Taboola reporting.
- It can optionally be used to activate specialized Taboola products and layouts.
- Fill in the
-
CSS selector: A CSS selector for an element that you will target on the page. The unit will be placed just below this element.
-
- Identify a target element will always be present on the homepage.* If you update your homepage, make sure to verify that your CSS selector still works.
-
Some examples:
- To target a section, fill in
section. - To target an ID of
my-id(e.g.<div id="my-id">), fill in#my-id.Note the leading hash character (
#) in the selector, indicating that this is an ID. - To target a class of
my-class(e.g.<div class="my-class">), fill in.my-class.Note the leading period (
.) in the selector, indicating that this is a class.
- To target a section, fill in
-
Occurrence - fill in the occurrence of the above, target element.
-
Example:
- To target the 2nd section, fill in
2.If your selector is unique - e.g. a unique ID - you can ignore this field.
- To target the 2nd section, fill in
- Click on Apply changes (bottom, right).
- If no errors are reported, browse to your website and verify that the unit displays correctly.
CSS SelectorFor assistance with CSS selectors, reach out via our online community, or contact Taboola Support.
