View Categories

Folders

Folders group snippets on this site. Each snippet can be in one folder or in none. Folders do not nest, and they have no effect on how or when a snippet runs.

Folders belong to the site, not to a collection. Snippets from different collections, including GitHub collections, can share a folder, and syncing or updating a GitHub snippet never changes its folder.

The snippets list #

The top of the snippets list shows your folders, each with its snippet count and how many of those snippets are active. Below them are the snippets that are not in a folder.

Click a folder’s name to open it. When you search or use the filter bar outside a folder, the list switches to every matching snippet, wherever it is, and adds a Folder column.

Creating a folder #

  • From the snippets list: click New Folder, enter a name and click Create Folder. The new folder opens straight away.
  • From the snippet edit screen: in the Folder card, choose New folder… and type a name. The folder is created when the snippet saves.
  • From the dashboard widget: click New Folder.

Folder names are unique, and the match ignores case. If you create a folder with a name that is already in use, the existing folder is used instead.

Inside a folder #

A folder’s page has:

  • New Snippet in Folder: starts a new snippet that is already assigned to this folder.
  • Rename: changes the folder’s name.
  • Add snippets that are not in a folder: tick snippets and click Add Selected to Folder to move several at once.
  • Delete Folder: available only while the folder is empty.

Moving snippets #

  • One snippet: change the Folder card on its edit screen and save. Choose No folder to take it out of every folder.
  • Several snippets: tick them in any list, pick the Move to folder bulk action, choose a folder (or New folder…) in the Move to folder… dropdown that appears, and click Apply. The Remove from folder bulk action moves the ticked snippets out of their folders.

Deleting a folder #

Only an empty folder can be deleted. Move its snippets to another folder or out of folders first, then use Delete Folder on the folder’s page.

Dashboard widget #

The Code Snippets widget on the WordPress dashboard lists your folders, which expand to show their snippets, followed by the snippets that are not in a folder. It has New Snippet and New Folder buttons. The widget is visible only to users who can manage snippets.

Toolbar menu #

When the WordPress toolbar is showing, users who can manage snippets get a Code Snippets menu:

  • Manage: all snippets, or only active, inactive or error snippets.
  • Add New: a new snippet of each type.
  • Folders: each folder lists its snippets and a New snippet here link. New Folder is at the bottom.
  • Active snippets and Inactive snippets: every snippet, grouped by status.
  • Import and Settings.