Halloween Sale 15% off Ends in See the plans

Snippet Library

Developer snippets for WordPress

Snippets for developers: debugging helpers, custom cron schedules, body classes, REST API tweaks and admin tools for checking hooks and queries. Building blocks for people who write code for WordPress every day.

1–4 of 4 snippets “excerpt”

  • PHP Developer

    Content Audit Summary (WP-CLI)

    Adds a "wp content-audit" command that shows, per post type, how many items are published, drafts, missing a featured image, missing an excerpt and not updated for two years.

  • PHP Developer

    Export Posts to a JSON File (WP-CLI)

    Adds a "wp export-json" command that writes published posts with their title, slug, dates, content, excerpt, categories, tags, featured image and author to a JSON file, for static sites, apps or archiving.

  • PHP Developer

    Random Post REST Endpoint

    Adds a public /wp-json/site/v1/random endpoint that returns one random published post with its title, link and excerpt, for "surprise me" buttons or widgets.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.