Halloween Sale 15% off Ends in See the plans

Snippet Library

Content snippets for WordPress

Snippets that add to or change your posts and pages: reading time, author boxes, “last updated” notes, content after the post or after a paragraph, and excerpt tweaks. For bloggers, publishers and anyone who wants richer posts without editing theme files.

1–24 of 32 snippets “id”

  • PHP Content

    "On This Day" Posts Shortcode

    Adds an [on_this_day] shortcode that lists posts published on today's date in previous years, a simple way to resurface archive content on the homepage or in a sidebar.

  • PHP Content

    "Preview" Banner on Unpublished Content

    Shows a clear banner at the top of the page whenever someone previews a draft, pending or scheduled post, so reviewers never mistake a preview for the live page or share it by accident.

  • PHP Content

    Attached Files List Shortcode

    Adds an [attached_files] shortcode that lists every PDF, document or other file uploaded to the current post as download links with file type and size, ideal for resources and meeting minutes.

  • PHP Content

    Button Shortcode

    Adds a [button] shortcode that turns a link into a styled button using your theme's button styles, for calls to action inside classic content and widgets.

  • PHP Content

    Custom Field Shortcode

    Adds a [field] shortcode that prints the value of a custom field of the current post, so you can show details like a price or a subtitle inside the content.

  • PHP Content

    Editorial Calendar Screen

    Adds a Posts > Calendar screen showing a month grid of published, scheduled and draft posts on their dates, with links to edit each one and arrows to move between months.

  • PHP Content

    Formatted Date Shortcode With Offsets

    Adds a [show_date] shortcode that prints today's date, or a date relative to it such as "+3 days" or "next friday", in any format, for delivery promises, deadlines and offer end dates.

  • PHP Content

    Inline Spoiler Shortcode

    Adds a [spoiler] shortcode that blurs a word or sentence until the reader clicks it or presses Enter or Space, and keeps the hidden text from screen readers until it is revealed.

  • PHP Content

    PDF Viewer Shortcode

    Adds a [pdf_viewer] shortcode that shows a PDF from the Media Library or a URL inside the page with the browser's built-in viewer, plus a download link for phones that cannot display it inline.

  • PHP Content

    Print Button Shortcode

    Adds a [print_button] shortcode that places a button visitors can click to print the current page, useful for recipes, guides and forms.

  • PHP Content

    Pull Quote Shortcode

    Adds a [pull_quote] shortcode that sets a short quotation in large type, floated to the side on wide screens and full width on phones, to break up long articles.

  • PHP Content

    Recently Updated Posts Shortcode

    Adds a [recently_updated] shortcode that lists the posts most recently revised, with the date they were updated, to show readers that older guides are being kept fresh.

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.