PHPackages                             victorhugobatista/wp-eruptor - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. victorhugobatista/wp-eruptor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

victorhugobatista/wp-eruptor
============================

Extend your single pages like lava in the water with less setup

0.3.0-beta(7y ago)15MITPHP

Since Nov 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/VictorHugoBatista/wp-eruptor)[ Packagist](https://packagist.org/packages/victorhugobatista/wp-eruptor)[ RSS](/packages/victorhugobatista-wp-eruptor/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (6)Used By (0)

wp-eruptor
==========

[](#wp-eruptor)

Extend your single pages like lava in the water with less setup

[![screenshot](screenshot.jpg)](screenshot.jpg)

Simple usage
------------

[](#simple-usage)

Add the lib by composer with the command below:

```
composer require victorhugobatista/wp-eruptor
```

Add the code below to your functions. Where the template files will be loaded by default at active-theme-dir/single-page-children.

```
use victorhugobatista\WpEruptor\Eruptor;
Eruptor::initialize();
```

You can pass the root directory where the templates will be loaded as the example below:

```
use victorhugobatista\WpEruptor\Eruptor;

$themePath = get_template_directory();
$templateToInclude = "{$themePath}/my-custom-template-dir";

Eruptor::initialize($templateToInclude);
```

Template files
--------------

[](#template-files)

The file structure to place the templates must be like below:

- Template root directory (**by now, the template folder must be placed here**)
    - single-page-children (**by now, this name can't be changed**)
        - single-book (**this represents the name of template file of single pages, in case single-book.php**)
            - child-a.php (**/book/existing-post-name/child-a**)
            - child-b.php (**/book/existing-post-name/child-b**)
            - child-c.php (**/book/existing-post-name/child-c**)
        - single-movie
            - child-d.php (**/movie/existing-post-name/child-d**)
            - child-e.php (**/movie/existing-post-name/child-e**)
            - child-f.php (**/movie/existing-post-name/child-f**)

The post id of parent single page will be available in the templates as:

```

```

Hooks reference
---------------

[](#hooks-reference)

HookDescription**eruptor/data**Inject data to all templates**eruptor/data/type/{post-type-slug}**Inject data to templates children of posts of an post type by slug**eruptor/data/post/{parent-single-post-id}**Inject data to templates children of an specific post by id**eruptor/data/template/{template-slug}**Inject data to one template by name### Example for eruptor/data\* hook:

[](#example-for-eruptordata-hook)

**/!\\ The wildcard \* can be replace with any eruptor/data filters above /!\\**

```
add_filter('eruptor/data*', function($data) {
  return array_merge($data, [
    'new-data' => 'new data added to template',
  ]);
});
```

The new data will be available on template on **$pageData** array:

```

```

Next steps (from @todo comments added to the code)
--------------------------------------------------

[](#next-steps-from-todo-comments-added-to-the-code)

- To receive what post types have to be added to routes on main class.
- Add filters to allow the modification of header, content and footer by post type, post name and template name.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

2733d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c4f5cd3d29e266d885fef4f40b2860d2f8074ff25c701e102465db2abd177ae?d=identicon)[victorhugobatista](/maintainers/victorhugobatista)

---

Top Contributors

[![VictorHugoBatista](https://avatars.githubusercontent.com/u/11706401?v=4)](https://github.com/VictorHugoBatista "VictorHugoBatista (50 commits)")

---

Tags

wordpressfast-routesingle-pagepretty permalink

### Embed Badge

![Health badge](/badges/victorhugobatista-wp-eruptor/health.svg)

```
[![Health](https://phpackages.com/badges/victorhugobatista-wp-eruptor/health.svg)](https://phpackages.com/packages/victorhugobatista-wp-eruptor)
```

###  Alternatives

[php-stubs/wordpress-stubs

WordPress function and class declaration stubs for static analysis.

19013.0M263](/packages/php-stubs-wordpress-stubs)[wpsitecare/carelib

A collection of helpful functions to make creating an awesome theme more enjoyable.

164.6k](/packages/wpsitecare-carelib)[bostondv/bootstrap-ninja-forms

Adds Bootstrap classes to Ninja Forms

222.2k](/packages/bostondv-bootstrap-ninja-forms)

PHPackages © 2026

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