the repo

01 / THE CATALOGUE

Snippets.

Find the code. Understand it. Make it yours.

THE SNIPPET LIBRARY

NEWEST FIRST

  1. Dynamic Image Caption

    Display the caption of a featured image — return function and shortcode — more on how I implemented this .

  2. Image and EXIF Data

    I used the following code to get basic image information and EXIF data. This assumes the PHP EXIF extension is enabled and you are not erasing EXIF on upload. I am basing this on a featured image…

  3. Replace Date Format

    I prefer to have my dates in human-readable time difference or AP style dates, so this function will replace the default date format and output either the human-readable time difference or if the…

    PHPWordPress Core
  4. Show Post Status

    If you work with numerous non-published posts, it might be helpful to show the status. This shortcode shows the status if the status is currently not “Publish.”

    PHPWordPress Core
  5. Display Open or Closed

    I used ChatGPT to generate a shortcode that would indicate whether a business is opened or closed.

    PHPWordPress Core
  6. Show WP custom fields when ACF is installed

    Since ACF turns off the WordPress custom fields, this snippet will bring them back. Just add it to your functions.php or your favorite code manager

    PHPACFWordPress Core
  7. Remove image title

    Remove the image title when you hover over an image.

    JavaScript