Baptiste Dufour

CAWEB master’s WordPress Theme

WordPress theme of the CAWEB Master's

During my second year of my master’s program, one of my university projects was to redesign the theme of the program’s website. The existing theme had become outdated and was riddled with bugs, so a complete overhaul was necessary.

A Rough Start

At that time, I had never developed a WordPress theme from scratch before. I had to familiarize myself with template files, the “template hierarchy,” and the concept of the “loop” that displays content. However, I quickly adapted and was able to create the various page templates according to the Figma designs provided by the Web Design team.

My CSS skills were particularly useful when integrating the designs, and I gained more experience in JavaScript while developing the mobile menu, which was fairly complex.

Custom Post Types and ACF

However, the CAWEB master’s website is not just a simple showcase site or a blog with a few pages and posts. I had to create custom post types to display information about the faculty members and showcase student projects.

Some of these custom post types required the use of the ACF (Advanced Custom Fields) plugin, which makes it easy to add editable fields to different types of content—whether they are posts, pages, custom post types, or even menu items. While this can also be done through code, ACF simplifies the process significantly by allowing everything to be managed from the back-end. To retrieve the saved entries, the plugin provides a straightforward “get_field” function to use within the template files.

Internationalizing the Theme

The CAWEB master’s website is bilingual, in both French and English, and uses the WPML plugin to manage translations. From a development perspective, the theme needed to be internationalized so that the text strings in the template files could be translated rather than hard-coded. To achieve this, internationalization functions are used to “wrap” the text strings, allowing them to be displayed in the appropriate language based on the current settings. This process requires generating a .pot file that contains all the wrapped strings, along with .po and .mo files for each language. I used the excellent “Loco Translate” plugin to handle this directly from the back-end.

A Successful Project

This university project gave me the opportunity to engage in real WordPress development. The site is now live and delivers on its promises in terms of functionality, bug-free performance, and improved aesthetics.

If you need some inspiration, feel free to check out the code on my GitHub repository. Future development of the theme will take place on a different repository and will be managed by the next cohort of CAWEB master’s students who will succeed me!