New on the blog: why AI belongs in the feed →
Home › Forums › GravityOps Help › GravityOps Code Snippet Manager: the snippet is active but nothing happens

GravityOps Code Snippet Manager: the snippet is active but nothing happens

The snippet shows Active, but its code does not seem to run. These checks find it almost every time.

Check these in order

  1. Status. Error means it failed to load; open it to read the message. Orphaned snippets from a GitHub collection do not run.
  2. Context. Frontend only skips admin, AJAX and REST requests. Admin only skips the front end. Test where the snippet is set to run.
  3. Hook. Code that needs post data may run too early on init. Try wp or template_redirect.
  4. Priority. If something else hooks the same action later and overrides you, raise your priority number.
  5. Targeting. JS, CSS and HTML snippets with page rules load only on matching pages. An HTML snippet at Start of body prints nothing if the theme does not call wp_body_open().
  6. Requirements. Functions from Gravity Forms or another plugin need that plugin active.

Full walkthrough: Snippet not running.

Still stuck after these? Reply with your plugin and Gravity Forms versions, what you checked, and the entry's notes, and we'll dig in.

<p>The snippet shows Active, but its code does not seem to run. These checks find it almost every time.</p><p><strong>Check these in order</strong></p><ol><li><strong>Status.</strong> Error means it failed to load; open it to read the message. Orphaned snippets from a GitHub collection do not run.</li><li><strong>Context.</strong> Frontend only skips admin, AJAX and REST requests. Admin only skips the front end. Test where the snippet is set to run.</li><li><strong>Hook.</strong> Code that needs post data may run too early on init. Try wp or template_redirect.</li><li><strong>Priority.</strong> If something else hooks the same action later and overrides you, raise your priority number.</li><li><strong>Targeting.</strong> JS, CSS and HTML snippets with page rules load only on matching pages. An HTML snippet at Start of body prints nothing if the theme does not call wp_body_open().</li><li><strong>Requirements.</strong> Functions from Gravity Forms or another plugin need that plugin active.</li></ol><p>Full walkthrough: <a href="https://brightleafdigital.io/docs/snippet-not-running/">Snippet not running</a>.</p><p>Still stuck after these? Reply with your plugin and Gravity Forms versions, what you checked, and the entry's notes, and we'll dig in.</p>

Leave a Reply

This topic is locked. No more replies are allowed.

Log in or create an account to reply.