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.
Building Basehim themes: templates, partials, the Customizer, menus, widgets, SEO, dates and images.
5 articles
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.
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.
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.
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.
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.