Snippet library
WordPress code snippets, ready to use.
707 free & Pro snippets and modules. Copy-paste-ready, or import in one click with SnipCraft.
WooCommerce GA4 Purchase Event
Sends a GA4 Measurement Protocol purchase event server-side when a WooCommerce order status changes to completed, capturing transaction ID, revenue, tax, shipping, and line items.
Track File Download Clicks
Fires a GA4 'file_download' event whenever a visitor clicks a link to a common document or media file extension, using navigator.sendBeacon for reliability.
Track Outbound Link Clicks
Fires a GA4 'click' event with category 'outbound' whenever a visitor clicks a link pointing to an external domain, using navigator.sendBeacon for reliability.
TikTok Pixel
TikTok Pixel base snippet for ad conversion measurement and audience creation — replace XXXXXXXXXXXXXXXXXXXXXXXX with your Pixel ID before activating.
LinkedIn Insight Tag
LinkedIn Insight Tag base snippet for conversion tracking and audience building — replace XXXXXXXXX with your Partner ID before activating.
Meta (Facebook) Pixel Base Code
Meta Pixel base initialisation and PageView event — replace XXXXXXXXXXXXXXXXXX with your actual Pixel ID before activating.
Google Tag Manager Head and Body
GTM container snippet with both the head script tag and the body noscript fallback — replace GTM-XXXXXXX with your Container ID and follow the placement comments.
Google Analytics 4 Tracking Code
GA4 base snippet that loads the gtag.js library and initialises your Measurement ID — replace G-XXXXXXXXXX with your actual ID before activating.
SEO Breadcrumbs Shortcode
Registers a [scseed_breadcrumbs] shortcode that renders a semantic nav breadcrumb trail with home link, optional category, and current page — no plugin required.
Insert Header and Footer Code
Provides two configurable injection points — wp_head and wp_footer — so you can paste any scripts or markup into every page without editing theme files.
Add Custom Meta Tag to Head
Outputs one or more custom name or property meta tags into the page head; edit the array to add or remove tags without touching theme files.
Add Site Verification Meta Tags
Adds Google Search Console, Bing Webmaster Tools, Yandex, and Pinterest domain verification meta tags to every page head; leave any value empty to skip that provider.
Add hreflang Tags for Translations
Outputs hreflang alternate link tags for multilingual sites using WPML or Polylang, with a single-language self-referencing fallback when neither plugin is active.
Set Meta Description from Excerpt
Automatically outputs a meta description tag using the post excerpt, or falls back to a trimmed plaintext snippet from the post content on singular pages.
Noindex Specific Pages by ID
Adds a noindex,follow robots meta tag to specific pages or posts identified by their numeric ID, without touching any other URLs.
Noindex Search, Author, Paginated
Adds a noindex,follow robots meta tag to search results, author archives, and paginated non-singular pages to prevent thin-content indexing.
Set Canonical Ignoring Query Strings
Replaces WordPress's default canonical link with a query-string-stripped version so paginated/filtered URLs don't compete for indexing.
Add Author/Person Schema
Outputs a Person schema.org JSON-LD block on author archive pages with name, URL, bio, and optional Twitter/social sameAs link for author entity markup.
Auto-Generate BreadcrumbList JSON-LD
Automatically builds and outputs a BreadcrumbList schema.org JSON-LD block on single posts, category archives, and taxonomy pages for Google breadcrumb rich results.
Add LocalBusiness Schema
Injects a LocalBusiness schema.org JSON-LD block on the homepage with your business name, address, geo-coordinates, hours, phone, and price range.
Add WebSite Schema with Search Box
Outputs a WebSite schema.org JSON-LD block with a SearchAction sitelinks searchbox so Google can surface a search field directly in results.
Add Organization Schema JSON-LD
Outputs an Organization schema.org JSON-LD block on the homepage with your site name, URL, logo, contact details, and social profile links.
Add Article Schema JSON-LD
Injects an Article schema.org JSON-LD block into single post pages with headline, description, dates, author, and featured image for Google rich results.
Add Twitter Card Meta Tags
Outputs twitter:card, twitter:title, twitter:description, and twitter:image meta tags on singular posts so X/Twitter renders rich preview cards.