Ads
Nova uses pmc-adm-v2 to manage ad units.
The location and provider props on the <AdUnit /> component (ref (opens in a new tab)) determine how the unit is configured.
Debugging
Add ?debug to any PMCQA environment URL to render ad unit placeholders.
VIP Go environments will have support after PMCP-5546 (opens in a new tab) is merged.
Registered ad units
Nova ships with many ad units already defined in class-pmc-adm.php (opens in a new tab).
All ad unit locations need to be registered here so they can be configured in the ad manager plugin.
Refer to the class for a canonical list of what options exist.
Ad sizes (300x250, 728x90, etc.) are configured by ad ops by targeting the ad unit locations. Nova does not set the sizes, ad ops does it in their configurations.
Site skins
- How do skins work?
When enabled, a
.has-side-skinsclass will be added to thehtmlelement. This allows Nova to shift its content to a narrower width.
Nova Core site skin styles (opens in a new tab).
Homepage ad units
See Configure homepage layout for more details and examples.
Use the pmc/ad block to place an ad anywhere inner blocks are supported.
[
"pmc/ad",
{
"mapTo": "pmc-ad-01",
"showPlaceholder": true,
"location": "river-1",
"provider": "boomerang"
}
]Some Nova blocks support configuring an ad unit. Refer to component schemas and models for usage details.
[
"pmc/nova-cards-river",
{
"mapTo": "cards-river-00",
"adUnitAfterCards": {
"location": "right-rail-bottom",
"provider": "boomerang"
}
}
]Right Rail Ad Units
For units in the right rail, use the PMC Ads Widget under "Appearance -> Widgets" and configure appropriately.
Known issues
Interscrollers and ads using fixed
Some ads use position: fixed which doesn't work with container queries.
The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block.
- Source: Stack Overflow (opens in a new tab)
We purposefully avoid using container queries on any element that wraps <GutenbergContent /> in an article to support these ads in limited locations.