PHPackages                             badcow/ink - 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. [Templating &amp; Views](/categories/templating)
4. /
5. badcow/ink

AbandonedLibrary[Templating &amp; Views](/categories/templating)

badcow/ink
==========

A Twig powered WordPress template builder.

125PHP

Since Mar 18Pushed 13y ago1 watchersCompare

[ Source](https://github.com/samuelwilliams/Ink)[ Packagist](https://packagist.org/packages/badcow/ink)[ RSS](/packages/badcow-ink/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Ink WordPress Starter Theme

\##What is *Ink*? Ink is a WordPress starter theme that harnesses the power of the [Twig template engine](http://twig.sensiolabs.org/) to build readable WordPress templates.

\##Why *Ink*? First, and foremost, **PHP is not a template engine!** If you would like to disagree, please [read this blog](http://fabien.potencier.org/article/34/templating-engines-in-php) before arguing.

> "If you think PHP is still a template language, can you give me just one recent change in the PHP language which enhanced PHP as a template language? I cannot think of one."

PHP is a dynamic language that started its life as a template engine, but has grown into a powerful, community-orientated language. PHP is no longer a templating language. Smarty, Django, HAML and Twig *are* templating languages.

\##If you decide to use Ink, you are not stuck with Twig. This is, by no means, and exhaustive replacement for traditional WordPress templates. If there is something that Ink cannot (yet) do that PHP does, you can still use a normal template file.

\##Installing Ink [Get Composer](http://getcomposer.org/download/)composer.phar install badcow/ink

\##Compare Twig to PHP Below we will compare two files that both achieve the same thing; they both render a page and list other pages. The first example uses Twig, the second uses PHP.

\###Twig syntax

```
{% extends 'base.html.twig' %}

{% block content %}

    {{ post.title }}
    {{ post.date.format('d/m/Y') }}
    {{ post.content }}

    List of posts

    {% set posts = postQuery.getPosts('post_type=page') %}

    {%for posty in posts %}
        {{posty.title}}
        {{posty.content | raw}}

    {% else %}
        There are no posts to be displayed, sorry.
    {% endfor %}

{% endblock %}

```

\###PHP syntax

```

    List of posts

            There are no posts to be displayed, sorry.

```

The advantage of Twig is that the syntax is more fluid and is closer to HTML than to PHP. In templating using PHP, it becomes a monstrous task to keep track of all the loop beginnings and endings.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dd5f6a3443d2ee5f0121397886a0141ba4f462d1a9686ba613de2815726b62f?d=identicon)[samuelwilliams](/maintainers/samuelwilliams)

---

Top Contributors

[![samuelwilliams](https://avatars.githubusercontent.com/u/806430?v=4)](https://github.com/samuelwilliams "samuelwilliams (23 commits)")

### Embed Badge

![Health badge](/badges/badcow-ink/health.svg)

```
[![Health](https://phpackages.com/badges/badcow-ink/health.svg)](https://phpackages.com/packages/badcow-ink)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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