PHPackages                             93devs/terra - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. 93devs/terra

ActiveLibrary

93devs/terra
============

This class helps to filter post taxonomies via ajax

03792PHP

Since Jun 14Pushed 3y agoCompare

[ Source](https://github.com/93digital/terra)[ Packagist](https://packagist.org/packages/93devs/terra)[ RSS](/packages/93devs-terra/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Terra
=====

[](#terra)

***v1.0.1***

Terra is a rewrite of the 93digital [Lama](https://93digital.gitlab.io/lama/) utility class. The class implements *dynamic filtering* functionality in WordPress and allows users to quickly filter index/archive pages for custom post types using taxonomies and other custom filters.

**NOTE**: php &gt;= 7.2 is required, earlier versions are not supported.

Installation
------------

[](#installation)

### Composer

[](#composer)

From your theme root, run the following command in your terminal to install Terra with [Composer](https://getcomposer.org/)

```
$ composer require 93devs/terra:dev-master
```

Then, in your `functions.php` add the following:

```
$GLOBALS['terra'] = new \Nine3\Terra();
```

If you have used Lama for the project you're working on you will need to remove it and any initialisations for it, namely `\Nine3\Lama::init();` as the two tools cannot work side by side.

### Luna

[](#luna)

Current Luna theme has Terra instantiated by default so you don't need to do anything. If you need to add Terra hooks, the place to do that is: `/inc/hooks/class-luna-terra-hooks.php`

If you're using an older version of Luna which doesn't have Terra baked in you will need to create a new class file in `/inc`, (this is where you will also add any Terra actions or filters) eg:

```
class Luna_Terra {
	public function __construct() {
		$GLOBALS['terra'] = new \Nine3\Terra();
	}
}
```

Then just instantiate the class in `/inc/class-luna.php` like so: `$this->terra = new Luna_Terra();`

Development
-----------

[](#development)

[npm](https://www.npmjs.com/) is needed to compile the JS file.

```
npm install
```

### Build the JS

[](#build-the-js)

```
npm run build
```

Debug
-----

[](#debug)

When [debugging is enabled](https://codex.wordpress.org/Debugging_in_WordPress) in WordPress Terra automatically outputs in the `debug.log` file, the following information:

- the [$args](docs/HOOKS-FILTERS.md#5) array parameters passed to the WP\_Query (when performing the ajax request)
- the [template](docs/USAGE.md#3) that is trying to load for each element found

Alternatively it's possible to set the constant `TERRA_DEBUG` to `true` to output that information inside the `wp-content/terra.log` file, add the following line to your starter theme/plugin:

```
define( 'TERRA_DEBUG', true );
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad0db6eb08bfce0ea7286e5242fa51d6180550885d09b2f6fa4f8ba0b5081c3c?d=identicon)[claritydevs](/maintainers/claritydevs)

---

Top Contributors

[![VicLobins93](https://avatars.githubusercontent.com/u/58182607?v=4)](https://github.com/VicLobins93 "VicLobins93 (94 commits)")[![MattKnight93](https://avatars.githubusercontent.com/u/83399317?v=4)](https://github.com/MattKnight93 "MattKnight93 (6 commits)")

---

Tags

javascriptphpwordpress

### Embed Badge

![Health badge](/badges/93devs-terra/health.svg)

```
[![Health](https://phpackages.com/badges/93devs-terra/health.svg)](https://phpackages.com/packages/93devs-terra)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
