Themosis - Laravel inspired Wordpress

Written by on

I'd been very Anti-Wordpress for a very longtime, with no in built templating language (Laravel has Blade, Shopify has Liquid), it was a plain old PHP mess with no real structure. However with the demand for clients for Wordpress built sites I was keen to begin exploring more suitable ways to develop with Wordpress. Introducing Themosis!

I love Laravel, it's structure, ease of use and very readable templating language, Blade. I'd tried a number of Blade plugins for Wordpress but their lack up community support left me feeling uneasy. I'd looked to Gulp as a way to compile my Blade files to plain PHP but nothing really worked as I'd hoped.

I began looking for alternatives to Blade - Twig had intrigued me and I'd heard of a well supported project called Timber for building Wordpress themes. Finally a readable solution! As I began theme building with timber though, it still didn't follow a format that worked for me and I was convinced there had to be a better solution that suited my needs.

I continued to search and eventually stumbled upon Themosis - Themosis described itself as "Themosis framework helps you structure and organise your code and allows you to better manage and scale your WordPress websites and applications.", It sounded ideal! But I was skeptical! Following the easy installation process using Composer I was pleasently surprised!

composer create-project themosis/themosis *WEBSITE NAME*

Those using Laravel Valet, if you don't want to mess around with editing file paths you will need to link to create a symbolic link as the public folder is "htdocs" which is not recognised by valet by navigating to the htdocs folder and running the following command:

valet link *WEBSITE NAME*

 Once up and running I was pleasantly surprised - The folder structure looked very familiar to anyone who has worked with Laravel:


The above image shows just how easy it was to add a new post type - "Books" and add custom meta fields without using something like "Advanced Custom Fields" plugin. You can see the result below:

 Another great thing is how easy you can switch your view files between Plain PHP, Blade and Twig by simply updating your file names from .php to .blade.php or .twig.

I'm really looking forward to continuing to work with Themosis, it's making me begin to enjoy working with Wordpress! If you're a Laravel developer who hates working with Wordpress I suggest you give it a go, it may change your mind!

  • Wordpress
  • Php
  • Laravel
  • Blade
Three Bears - Web design and development
Loading