Toggle Template Builder Ability: Enable or Disable a Theme Template in WordPress

Key Takeaways

  • Nexter/toggle-template-builder ability enables or disables a Nexter theme builder template by its ID.
  • id parameter is required and must be an integer, while status parameter uses integers: 1 for active and 0 for inactive.
  • Disabling a template moves it to draft status, preventing it from displaying on the frontend.
Table of Contents

The nexter/toggle-template-builder ability enables or disables a Nexter theme builder template by its ID. Pass the template ID and an optional status value (1 for active, 0 for inactive). If you omit status, the ability flips the current state. Use nexter/list-templates-builder to find the template ID first.

Key Takeaways

The id parameter is required and must be an integer.

The status parameter uses integers: 1 for active (published), 0 for inactive (draft).

When status is omitted, the ability flips the template’s current state.

Disabling a template moves it to draft status, stopping it from displaying on the frontend.

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

**id** (integer, required) is the WordPress post ID of the template to toggle.

**status** (integer, optional) sets the target state. Use 1 for active (publish) and 0 for inactive (draft). Omit to flip the current state.

What It Returns

The ability returns: success (boolean), new_status (the state after the change), and message (a confirmation string).

When to Use This Ability

Publish a header or footer template to activate it on the frontend.

Move a template back to draft to temporarily hide it without deleting it.

Automate template activation as part of a staging-to-live deployment workflow.

Related Documentation

List Templates Builder Ability: nexter/list-templates-builder

Delete Theme Builder Template Ability: nexter/delete-template-builder

Update Template Builder Ability: nexter/update-template-builder

About the Author

sandip patel

WordPress Developer at POSIMYTH Innovations I am a passionate WordPress Developer at POSIMYTH Innovations, where I focus on building high-performance products and cutting-edge web experiences. Currently, I contribute to the development of major projects including The Plus Addons for Elementor, Sticky Header for Elementor, RankReady AI (LLM & SEO), and the SproutOS MCP server integration. I love bridging the gap between WordPress core functionality and modern AI capabilities. Beyond standard development.

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!