Fix: "not passed the snippet ID" Error in Woody Snippets
This article explains why Woody displays a "not passed the snippet ID" warning on the front end and how to repair the broken shortcode or block reference causing it.
Troubleshooting: "not passed the snippet ID" error
If a red message such as [wbcr_php_snippet]: PHP snippets error (not passed the snippet ID) appears on the front end (the [wbcr_html_snippet] and other snippet types show the same warning), the shortcode or block could not be matched to a valid snippet. This happens when:
- The shortcode has no
idattribute, or theidis empty. - The
idpoints to a snippet that has been deleted. - The
idpoints to a snippet of a different type — for example, an HTML snippet's ID used inside a[wbcr_php_snippet]shortcode.
The numeric id is what links a shortcode to its snippet. The title attribute is only a label for your own reference, so a shortcode without a valid id always shows this warning even when the title is correct.
📝 Note: A snippet's ID is fixed when the snippet is created. If you delete and recreate a snippet, the new snippet gets a new ID, and any shortcode still using the old ID shows this warning.
To repair a broken reference:
- Go to Woody Snippets in the WordPress admin menu and open the snippet you want to display.
- Copy its current shortcode, or note its numeric ID.
- Edit the page, post, widget, template, or page-builder element that contains the broken shortcode or block.
- Replace the old reference with the current one — for example
[wbcr_php_snippet id="XXXX"]— using the matching shortcode for HTML, text, or CSS snippets. - If the snippet no longer exists, either recreate it and update the reference to the new ID, or remove the orphaned shortcode or block.
- Save your changes, clear any caching plugin or server cache, and reload the page to confirm the warning is gone.
To find references that may still point to a missing snippet, search your content for wbcr_php_snippet and wbcr_html_snippet, and check Woody snippet blocks used in posts, pages, widgets, templates, and page builders.
