Stay Up To Date With Ujenzi

[mc4wp_form id="123"]

Join the Ujenzi mailing list to get program updates from time to time and stay in the loop with the great work that we are doing!

Recent News & Updates

Page Category: tr

Debugging & Tracy

Theme Redone uses Nette’s Tracy Debugger out of the box. It is imported and defined in the /php-inc/latte.php file, where the Latte engine is initialized as well. Before going live, we suggest either commenting out or removing these 2 lines: /php-inc/latte.phpuse Tracy\Debugger; Debugger::enable();...
Read More

Javascript UI Elements & Classes

Theme Redone is a modular framework that doesn’t include redundant and unused files. It also doesn’t include libraries such as jQuery, or Bootstrap, to name a few, as we want to ship fast and performant websites. However, it comes with a few Javascript classes responsible for building and...
Read More

Partials

Partials in the context of theme-redone, are reusable pieces of code that live inside /views/parts/ directory. To include them in the template we are working with, we would use the latte’s include, along with the tr_part('partial-name') helper function. So, if the partial’s name is...
Read More

Simple Grid System

At this point, grids can be created on the go using CSS Flexbox or Grid systems. So we believe that depending on / or creating grids that rely on predefined class names, is overkill. Instead, we created a utility for creating simpler grids, that works with the combination of Flexbox and CSS variables. This...
Read More

Premade Blocks

Theme Redone has a few premade blocks, that can be used as is or they can serve as a reference. If not needed, they can easily be removed via the TRB-CLI. Those blocks are: Image – Makes use of tr_a and tr_get_media helper functions. Video – Responsive Video block that can render Vimeo, Youtube,...
Read More

Field Types

In this article, we will be using the terms “field” and “field type” interchangeably. We are referring to the same thing – the field that will be rendered inside the block on the edit screen. The only difference is that, when we say field type, we are referring to the structure...
Read More

SVG Handling

Theme Redone supports SVG ( uploading to media uploads, using it in on the front-end and handling via the tr_get_media() function ). But, to enable this feature, go ahead and install the SVG Support plugin by Benbodhi. We could’ve written our own implementation, but we opted for using this plugin...
Read More

Theme Functions

A Set of Useful Helper Functions All of the functions are located in the  /php-inc/theme-functions.php file. tr_a Makes it easier to work with links. {tr_a($link_object)} Read More tr_is_ie Detects IE browser. {tr_is_ie()} Read More tr_hex_to_rgb Converts HEX to RGB. {tr_hex_to_rgb($hex)} Read More...
Read More

Assets Folder

All the images and SVGs should go into corresponding subdirectories of the assets folder. The 2 reasons why you should always keep theme-related assets in this folder are: Consistency Because of a useful utility function tr_get_media, that we can use to easily display images/SVGs on our pages. Quick example...
Read More

Lazy Loading

Theme Redone has support for lazy loading images and SVGs. Either self-hosted (stored in theme files, or the ones uploaded to media), or images/SVGs with absolute paths from different websites can be lazily loaded. For more info, read the page about the tr_get_media() helper...
Read More

Single Block Creation Process

Inside /gutenberg/blocks/ there is a directory (block) called new-block-blueprint. This block serves as a base from which we copy files to create new blocks, and it shouldn’t be renamed or deleted. To manage blocks (create/rename/remove), we suggest using the trb-cli helper that automates and speeds...
Read More

Gutenberg Blocks Framework

Theme Redone is the first open-source custom WordPress theme starter with its own native, easy-to-learn, stable and standardized Gutenberg blocks creation solution. One of the major features that differentiate Theme Redone from other WordPress theme starters and frameworks is that it comes with its own...
Read More

Why Latte as a Templating Engine

When it comes to using templating engines in PHP, we have various solutions. Blade, Twig, Latte, Plates, Volt, to name a few. We opted to use Latte because it’s fast, reliable, and very easy to integrate with WordPress. Also, the company that built Latte, Nette, also has a great PHP debugger called...
Read More

Files Structure

. ├── assets │ ├── img │ └── svg ├── cptui │ ├── post_types.php │ └── taxonomies.php ├── gutenberg │ ├── blocks │ │ ├── new-block-blueprint │ │ │ ├── _editor.scss │ │ │ ├── controller.php │ │ │ ├──...
Read More

Block Structure

Gutenberg Block in the context of our WordPress framework is, simply put, a set of files that “live” in the folder that has the name of the block (kebab-cased if it consists of multiple words).   MVC approach and Laravel inspiration If you ever worked with any MVC-oriented web framework,...
Read More

What problems does theme_redone solve?

theme_redone, out-of-the-box, comes equipped with all the right tools to streamline our dev process and make it standardized and a pleasure to code with. It has a modern workflow, uses latte templates, Gutenberg support as its main strength, cleverly coded helper functions, and a lot more which we will...
Read More

Getting Started

On GitHub Dependencies: PHP (version: ^7.4) composer (version: ^2.0.2) Node.js (Node version: 14.19.1) gulp-CLI (Gulp 4) Download the Theme Download and install the latest version of the theme At the root of the theme, there is a “theme_redone_global_config.json” file. Replace...
Read More

Theme Redone

The Framework for Developing Custom WordPress Themes with its own Gutenberg Blocks creation solution. Latte templating engine for cleaner and nicer syntax Modern workflow with ESBuild, WebPack, Gulp4 and React support Native Gutenberg blocks creation solution with its own CLI theme_redone is everything we...
Read More