DocsOCodeInsertSnippet Types, Locations & Targeting
Reference

Snippet Types, Locations & Targeting

OCodeInsertorravo.com/docs/ocodeinsert/snippet-types-locations-targeting

Snippet Types

TypeLabelAuto-wrap
htmlHTMLNo — raw output
jsJavaScriptWraps in <script>…</script> unless already present
cssCSSWraps in <style>…</style> unless already present

Type drives syntax highlighting and auto-wrap logic. It does not change where the snippet fires — that is Location.

Injection Locations

Location keyWordPress hookNotes
headwp_head (priority 1)Analytics, tracking pixels, preconnect
before_contentthe_content filterSingular templates only
after_contentthe_content filterSingular templates only
footerwp_footer (priority 1)Chat widgets, deferred scripts

If a theme bypasses the_content, OCodeInsert fires a JS fallback via wp_footer that targets the article body.

Page Type Targeting

ValueMatches
allEvery page (default)
frontis_front_page()
singleis_singular()
archiveCategory, tag, date archives + blog index
searchis_search()
404is_404()

URL Pattern Targeting

Comma-separated URL paths relative to the domain root. Use * as a wildcard. Case-insensitive; trailing slashes ignored.

/about, /blog/*, /shop/product-category/*

User Condition

ValueBehavior
allAll visitors (default)
logged_inLogged-in users only
logged_outLogged-out visitors only

Check order

All conditions must pass for a snippet to fire:

  1. Plugin globally enabled?
  2. Safe Mode active?
  3. ?oci_safe=1 in URL?
  4. Page type passes?
  5. User condition passes?
  6. URL pattern passes?
  7. Snippet is active?
Snippet Types, Locations & Targeting — OCodeInsert Docs — Orravo