Halloween Sale 15% off Ends in See the plans

Snippet Library

WordPress code snippets, ready to use

3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.

1–24 of 210 snippets “shortcode”

  • PHP Users

    "Delete My Account" Request Button

    Adds a [wpide_delete_account] shortcode with a button that files an erasure request in WordPress's privacy tools; the member confirms by email and you process it under Tools > Erase Personal Data.

  • PHP Privacy & Cookies

    Adds a [do_not_sell_link] shortcode for the opt-out link US state privacy laws such as the CCPA require; clicking it records the visitor's opt-out in a cookie and tells marketing scripts held back by consent snippets not to run.

  • 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 Users

    "Member Since" Shortcode

    Adds a [wpide_member_since] shortcode that shows the date the logged-in member joined, or how long ago, for welcome messages and account pages.

  • 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 Custom Post Types & Fields

    ACF Image Field Shortcode

    Adds an [acf_image name="hero" size="large"] shortcode that outputs a responsive image from an ACF image field, whatever return format the field uses.

  • PHP Custom Post Types & Fields

    Adds an [acf_button name="cta"] shortcode that renders an ACF link field as a theme-styled button, respecting the "open in new tab" choice.

  • PHP Accessibility

    Accessibility Statement Shortcode

    Adds an [accessibility_statement] shortcode that prints a ready-made accessibility statement with your site name, target standard, contact email and review date.

  • PHP Frontend & Design

    Accessible Tabs Shortcode

    Adds [wpide_tabs] and [wpide_tab title="..."] shortcodes to build tabbed content that works with mouse, keyboard (arrow keys) and screen readers.

  • PHP Developer

    Add Your Own Setting to the Customizer

    Adds a "Site extras" section to Appearance > Customize with a footer note and a contact phone field that preview live, and makes them available with a [site_extra] shortcode, as a pattern for your own settings.

  • PHP Archives

    Archives List Shortcode

    Adds an [archives] shortcode that lists your posts by month or year, as a list or a dropdown, anywhere in content or widgets.

  • 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.

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.