Alloy Core is WordPress library I developed based on years of agency experience. The goal is to streamline the creation of integrating designs into a theme. I came to realize that a lot of what I was doing as a developer was reinventing the wheel from project to project. A lot of time was also spent ripping out “features” that other starter themes afforded. The designs for these projects are highly custom but so many developers try to jam a square peg into a round hole.
Some effort was spent on trying to make a more modern coding pattern for developers as well. Instead of intermingling HTML with PHP the Twig templating engine is available through Timber. Data is passed to templates through class methods using introspection.
Main features of Alloy Core include:
- Quickly register custom post types or taxonomies
- Register Advanced Custom Fields fields through PHP using a wrapper that makes it a breeze
- Quickly pass data to Twig templates
View Alloy Core on GitHub:
Frequently Asked Questions
What’s behind the name?
Originally my WordPress library was called Slate. It was a standalone plugin that when activated would make registering post types easier. It would also give the active theme some special capabilities such as quickly adding style/script files, some helper functions and for some reason an autoloader. The companion theme was called Onyx, keeping with the rock theme.
As time passed it made more sense to bring the functionality of Slate inside the theme. This version became known as Alloy, which is the combination of two or more metals. The “Core” part of the name comes from this being the base of Alloy. In the future I’d like to have optional scripts that can be added to give more functionality to Alloy Core. Think “Alloy AJAX” or “Alloy Menus”. Just an idea.
All of that in a theme?
It’s a known best practice to register your custom post types and taxonomies as their own plugin. This way if a client switches themes their custom post types and taxonomies still show up. Let’s face it though. It’s easier to develop a website when you don’t have to switch between directories so often. These are highly custom websites. If someone deactivates the theme they’re going to have more problems than not being able to edit Case Studies.
Should I use a child theme for Alloy Core?
No. Maintaining a child theme in addition to your main theme is an unneeded layer of abstraction. Since the work we do is highly custom there isn’t a risk of a theme update coming in over the wire and overwriting work. Future versions of Alloy Core can be installed by downloading the source and replacing the “core” directory.