learndash/delete-topic permanently deletes or trashes a topic.
Like lessons, it affects every course the topic was in.
Before you run it
Quizzes nested under the topic are not deleted — they survive as orphans. The topic is removed from every course outline that contained it, and the response lists which. To remove a topic from one course without deleting it, use learndash/detach-step. Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.
At a glance
| Ability | learndash/delete-topic |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Lessons, Topics & Quizzes |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Destructive — requires confirm_title. Nested quizzes are not deleted. |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
LearnDash does not cascade deletions down a course outline. Steps nested under what you delete survive as orphans — still in the library, attached to nothing, invisible to learners and easy to lose track of.
For a topic that means its quizzes — which are frequently the part with learner attempts recorded against them, and which will now be unreachable while those records persist.
That combination is worth avoiding: a quiz nobody can take, holding attempt history that still appears in reporting.
Detaching from one course is the narrower operation and leaves the topic intact everywhere else.
Prefer force=false, which trashes the post and is reversible. Permanent deletion is the option that needs a reason.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
topic_id | integer | Yes | The topic. |
confirm_title | string | Yes | Must exactly match the current title on the live record. |
force | boolean | No | True deletes permanently; false trashes. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
topic_id | integer | The topic. |
affected_courses | array | Every course outline it was removed from. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Delete that topic.
It resolves to one call:
{
"ability": "learndash/delete-topic",
"parameters": {
"topic_id": 560,
"confirm_title": "Keyboard shortcuts"
}
}Worth knowing
- Nested quizzes survive, unreachable, with their attempt history intact.
- Removed from every course it was in.
- Detaching is the single-course alternative.
- Trashing is reversible.
Related abilities
- LearnDash Detach Step — remove it from one course only
- LearnDash List Quizzes — find the quizzes underneath
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category