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 44 snippets “shortcode”

  • PHP Content

    Adds a [map_link] shortcode that links an address to Google Maps or Apple Maps directions, opening the visitor's maps app on phones, without embedding a map or loading any script.

  • 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

    "Years Since" Shortcode

    Adds a [years_since] shortcode that prints how many full years have passed since a date, such as years in business, years of experience or a person's age, so the number never goes out of date.

  • 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

    Authors List Shortcode

    Adds an [authors_list] shortcode that shows everyone who has published posts, with avatar, short bio and number of posts, linking to each author's archive, for "Our writers" pages.

  • 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

    Child Pages List Shortcode

    Adds a [child_pages] shortcode that lists the subpages of the current page, so section landing pages always link to everything below them.

  • PHP Content

    Adds a [phone_link] shortcode that prints your phone number as a tap-to-call link, formatted for reading but dialled correctly in international format, so it only needs to be changed in one place.

  • PHP Content

    Countdown Timer Shortcode

    Adds a [countdown] shortcode that shows a live days, hours, minutes and seconds countdown to a date, with a message once the time is up.

  • PHP Content

    Current Year

    Outputs the current year. Insert it with the snippet shortcode anywhere you need a year that updates itself, such as a footer notice.

  • 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

    Footnotes Shortcode

    Adds a [ref] shortcode for footnotes: each note becomes a numbered superscript link, and all notes are listed at the end of the post with links back.

  • 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 SVG Icon Shortcode

    Adds an [svg_icon] shortcode with a small built-in set of clean SVG icons, such as check, cross, star, arrow, info, warning, phone and mail, sized to match the surrounding text.

  • 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

    Registers a [login_logout_link] shortcode that shows "Log in" to visitors and "Log out" to logged-in users, returning them to the same page.

  • PHP Content

    Notice Box Shortcode

    Adds a [notice] shortcode for colored info, success, warning and error boxes that make tips and important warnings stand out in your content.

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.