25% off ProSNIPC25OFF

Snippet library

WordPress code snippets, ready to use.

707 free & Pro snippets and modules. Copy-paste-ready, or import in one click with SnipCraft.

PHPPro

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.

#analytics#ecommerce#ga4
JavaScriptPro

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.

#analytics#downloads#events
JavaScriptPro

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.

#analytics#events#ga4
HTML

TikTok Pixel

TikTok Pixel base snippet for ad conversion measurement and audience creation — replace XXXXXXXXXXXXXXXXXXXXXXXX with your Pixel ID before activating.

#analytics#marketing#social
HTML

LinkedIn Insight Tag

LinkedIn Insight Tag base snippet for conversion tracking and audience building — replace XXXXXXXXX with your Partner ID before activating.

#analytics#b2b#linkedin
HTML

Meta (Facebook) Pixel Base Code

Meta Pixel base initialisation and PageView event — replace XXXXXXXXXXXXXXXXXX with your actual Pixel ID before activating.

#analytics#facebook#marketing
HTML

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.

#analytics#google#gtm
HTML

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.

#analytics#ga4#google
PHP

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.

#breadcrumbs#frontend#navigation
PHP

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.

#customization#footer#head
PHP

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.

#custom#head#html
PHP

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.

#google#meta#seo
PHPPro

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.

#hreflang#international#meta
PHPPro

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.

#description#excerpt#frontend
PHP

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.

#meta#noindex#pages
PHPPro

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.

#meta#noindex#robots
PHPPro

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.

#canonical#meta#seo
PHPPro

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.

#author#json-ld#schema
PHPPro

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.

#breadcrumbs#json-ld#navigation
PHPPro

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.

#json-ld#local-seo#schema
PHPPro

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.

#json-ld#schema#search-box
PHPPro

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.

#json-ld#organization#schema
PHPPro

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.

#json-ld#posts#schema
PHPPro

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.

#frontend#meta#seo