DocsOAdsTargeting System
Reference

Targeting System

OAdsorravo.com/docs/oads/targeting-system

Targeting is evaluated server-side in OAds_CPT::passes_targeting() before an ad is served.

Device Targeting (_oads_target_device)

ValueBehavior
bothAll devices (default)
mobileMobile only (uses wp_is_mobile())
desktopDesktop only

User Role Targeting (_oads_target_roles)

Comma-separated list of role slugs. Special values:

  • logged_in — any authenticated user
  • logged_out — unauthenticated visitors
  • subscriber, editor, administrator — specific roles

Example: logged_in, subscriber

Category Targeting (_oads_target_categories)

Comma-separated category IDs. Ad shows only when the current page belongs to one of those categories. Works on singular posts and category archive pages.

Example: 3, 7, 12

Country Targeting (_oads_target_countries)

Comma-separated ISO 3166-1 alpha-2 country codes. Requires a geo-IP lookup at the theme level — OAds reads a constant or option OADS_VISITOR_COUNTRY if defined. Leave blank to show to all countries.

Frequency Cap (_oads_freq_cap)

Maximum impressions per user per day. Implemented in JavaScript using localStorage (key: oads_fc_{ad_id}). Set to 0 to disable.

Date Scheduling

  • _oads_start_date — YYYY-MM-DD, ad won't show before this date
  • _oads_end_date — YYYY-MM-DD, ad won't show after this date

Targeting System — OAds Docs — Orravo