Skip to content

Category: Themes

Building Basehim themes: templates, partials, the Customizer, menus, widgets, SEO, dates and images.

5 articles

Build a theme from scratch

A step-by-step tutorial. Build "Notebook", a clean reading theme with a header, menus, a sidebar widget area, post cards, pagination, comments, an author box and a Customizer accent colour, in plain PHP and CSS.

Asif Mughal

SEO, dates and images in themes

What core's SEO service prints so your theme doesn't have to, how to adjust it per page or site-wide, how to show dates in the site's timezone, and how to print responsive featured images.

Asif Mughal

Customizer options, menus and widgets

Declare Customizer options in theme.json and use them as CSS variables, add menu locations and widget areas, ship your own widgets, style the comment form and author box, and register filters from boot.php.

Asif Mughal

Theme reference: variables and helpers

Every variable a template receives, the fields on a post row, and every helper function a theme can call: menus, widgets, comments, authors, images, dates, settings and assets.

Asif Mughal

Theme development

How a Basehim theme is put together: the folder layout, theme.json, templates and partials, the data core passes in, bh_head() and bh_footer(), assets, pagination and packaging.

Asif Mughal