All Projects
2025

Torlak Turizm WordPress Theme

Migration from an off-the-shelf WordPress theme to a custom-built one: Carbon Fields powered manageable content, tour custom post types, and AJAX filtering.

Torlak Turizm WordPress Theme

PROJECT DETAILS

Torlak Turizm is a travel agency with over 30 years of experience offering Hajj, Umrah, cultural tours, and transfer services. The site ran on an off-the-shelf WordPress theme: content was largely locked inside a page builder, tour packages were stored as ordinary posts and pages, and entering content for each new season was tedious. I migrated this setup to a custom WordPress theme built from scratch. Why a Custom Theme The off-the-shelf theme broke down in three places. Because tours were stored as content rather than data, they could not be filtered by date, duration, airline, or hotel. The extra markup produced by the page builder and the stack of plugins it pulled in dragged down page speed. Corporate details such as brand colors, logo, and WhatsApp number were scattered page by page and could not be updated from a single place. Architecture The theme is split into modules loaded conditionally from 'functions.php': theme setup, enqueue, helpers, custom post types, taxonomies, field schemas, theme options, AJAX filtering, contact form, and SEO. Each module carries a single responsibility. For content modeling, four custom post types were defined: 'umre_turu', 'hac_programi', 'kultur_turu', and 'cruise_turu'. Each produces clean URLs through its own rewrite slug ('umre-turlari', 'hac', 'kultur-turlari', 'cruise-turlari'). The filtering axis moved into taxonomies: tour date, duration, airline, Mecca hotel, Medina hotel, and price category. Manageability and Carbon Fields The theme's core principle was that no content should be hardcoded. Carbon Fields was used to define CPT meta fields, term meta schemas for hotels and airlines, and the theme options pages. Because field definitions live in code rather than in the database, the theme stays fully compatible with version control and is easy to hand over. Brand colors are entered from the theme options and printed into 'wp_head' as ':root' CSS variables; since the stylesheet consumes those variables, a color change propagates across the entire site instantly. The WhatsApp number is managed from a single field, and every "Info and Reservation" button along with the floating bubble is fed by the same helper function. Tour Filtering I built an AJAX-based filter panel for the Umrah archive. Request parameters are translated into 'tax_query' and 'meta_query' arguments, pagination is preserved, and the same query builder serves both the AJAX handler and the main archive query through 'pre_get_posts', so filtered results still work correctly with JavaScript disabled. To speed up price sorting, taxonomy values are mirrored into post meta, and a backfill function was written to populate existing records retroactively. Performance The page builder and its accompanying plugins were removed entirely; templates were written directly in PHP. CSS and JS versions are tied to 'filemtime', so cache busting works without manually bumping a version number. WordPress's default head output was cleaned up, image sizes were defined at the theme level, and no client-side dependency beyond Swiper was left for the slider. Preserving SEO The most critical part of the migration was preserving existing organic traffic. New rewrite slugs were mapped against the old URL structure and permanent redirects were put in place. The theme carries its own SEO layer, emitting meta description, canonical, Open Graph, and Twitter Card tags. If an SEO plugin is active, the theme disables its own output to avoid conflicts. On the structured data side, Organization, Tour (with price offers and currency converted to ISO 4217), and BreadcrumbList schemas are printed as JSON-LD. Zero-Downtime Migration The new theme was developed in a staging environment where the content transfer was verified. On activation the theme flushes rewrite rules and seeds sample terms for taxonomies such as duration, price category, and airline, which reduced the go-live step to a single theme switch. Carbon Fields is installed under 'vendor/' via 'composer install'; if the library is missing the theme does not crash, it simply shows an admin notice and hides the custom field panels. After launch, an administrator guide was prepared for the client's team. Conclusion The site ended up with reduced plugin dependency, tour packages genuinely modeled as data, and full manageability from the admin panel. Adding a new seasonal tour went from duplicating blocks in a page builder to creating a CPT entry and picking taxonomy terms; filtering, price sorting, and structured data are all derived from that entry automatically.

TECHNOLOGY STACK

WordPressPHPCarbon FieldsCustom Post TypeAJAXSEOSchema.orgSwiper