---
title: "List Snippets Ability: Get All Code Snippets with Filters in WordPress"
url: https://nexterwp.com/docs/nexter-list-snippets/
date: 2026-05-29
modified: 2026-05-29
author: "sandip patel"
description: "The nexter/list-snippets ability returns all Nexter Extension code snippets, with optional filters for snippet type and status. Results are ordered newest first."
word_count: 264
---

# List Snippets Ability: Get All Code Snippets with Filters in WordPress

## Key Takeaways

- Nexter/list-snippets ability returns all code snippets stored in Nexter Extension, filterable by snippet type and active status.
- Results are ordered by creation date, newest first, and the ability is read-only, meaning it does not modify or delete snippets.
- Use nexter/get-snippet with a specific ID to retrieve full code and metadata for individual snippets.

The **nexter/list-snippets** ability returns all code snippets stored in Nexter Extension. You can filter by snippet type (PHP, CSS, JavaScript, HTML) and by active or inactive status. Results are returned newest first. Use this ability to browse all snippets or locate a specific snippet ID before reading or editing it.

## Key Takeaways

Both type and status parameters are optional. Omitting them returns all snippets.

Results are ordered by creation date, newest first.

This ability is read-only. It never creates, modifies, or deletes any snippet.

Use nexter/get-snippet with a specific ID to retrieve the full code and metadata for one snippet.

## Required Setup

This ability ships with Nexter Extension (Free). If you do not have it installed, follow the guide on how to install and activate Nexter Extension first.

## Parameters

**type** (string, optional) filters snippets by code type. Options: php, css, javascript, htmlmixed, or empty string for all types.

**status** (string, optional) filters snippets by active state. Options: active, inactive, all, or empty string for all.

## What It Returns

The ability returns an array of snippet summary objects, ordered newest first. Each object includes: **id**, **name**, **type**, **status** (active or inactive), **description**, and **tags**. The full code content is not included in list results. Use nexter/get-snippet to retrieve the complete snippet with code.

## When to Use This Ability

Find a snippet ID before calling nexter/get-snippet, nexter/update-snippet, or nexter/toggle-snippet.

List all active PHP snippets to audit what server-side code is running on a site.

Display a summary list of snippets in an admin panel without loading full code content.

## Related Documentation

Get Snippet Ability: nexter/get-snippet

Create Code Snippet Ability: nexter/create-snippet

Toggle Snippet Ability: nexter/toggle-snippet