Skip to content

Feature/pedro the pug - Challenges 1 and 2 - #38

Open
PedroPLSR wants to merge 3 commits into
masterfrom
feature/pedro-the-pug
Open

Feature/pedro the pug - Challenges 1 and 2 #38
PedroPLSR wants to merge 3 commits into
masterfrom
feature/pedro-the-pug

Conversation

@PedroPLSR

Copy link
Copy Markdown

Challenge 1 + 2

Both MeanPug challenges on this branch. Each has its own Docker setup (challenge-1/, challenge-2/).


Challenge 1 — Airbnb-style front page

Visual replica of the Airbnb homepage above the fold

Main files

  • challenge-1/theme/template-parts/headers/header-front-page.php — header + pug logo
  • challenge-1/theme/template-parts/content-front-page.php — page content
  • challenge-1/theme/assets/css/templates/front-page.css — plain CSS, BEM
  • challenge-1/theme/assets/images/cute-pug.png — MeanPug pug replaces Airbnb logo
  • challenge-1/theme/functions.php — enqueues front-page CSS without relying on the webpack pipeline

Notes

  • No real search/dropdown behavior — layout only
  • Layout is responsive (stacked search bar and burger menu on mobile).
  • file_exists / function_exists('get_field') guards so a fresh clone doesn't fatal without ACF

To view: cd challenge-1 && docker compose up -d → homepage


Challenge 2 — Backend / content model (Law Firm of Pug and Puggle)

Filled the MeanPug skeleton with a PI law firm content model. CPTs, taxonomies, ACF, schema.

Full setup: challenge-2/docs/SOLUTION.md

CPTs (4)theme/inc/cpt/post-types-config.php + register.php

  • practice-area (hierarchical)
  • team → public URLs under /attorney/
  • localcontent_type splits Area Served vs Office Location
  • testimonials

Taxonomiestheme/inc/tax/register.php

  • practice-category, attorney-department, testimonial-source
  • area-served on local + practice-area
  • event-type on native post

Decisions

  • No office CPT — offices live in local
  • No event CPT — post + event-type + ACF fields
  • ACF free only — field groups in theme/acf-json/, sync via inc/acf.php

Schemainc/hooks.php + inc/utils/seo/schema.php
LocalBusiness, Product/Review, FAQPage depending on content type.

Also included

  • Optional seed: scripts/seed-demo-content.php
  • Docs: docs/content-model-rationale.md, docs/plugin-decisions.md

Plugins: ACF, Yoast SEO, Classic Editor

- Introduced a new header partial for the front page with an announcement bar and logo.
- Updated the main header to include navigation links and a search bar.
- Created a new front-page CSS file for styling specific to the front page layout.
- Added a new content template for the front page featuring category tabs, a hero banner, and a card grid.
- Included a cute pug image for branding purposes.
…F usage

Adjust mobile responsiveness on the Airbnb front page (stacked search bar,
burger menu, and responsive spacing) and restructure asset loading so the
page renders correctly without relying on the broken MeanPug build pipeline.
- Enqueue front-page CSS directly from source instead of compiled main.css
- Replace Tailwind/@apply with plain CSS and BEM classes in templates
- Guard compiled asset enqueues with file_exists to avoid errors on fresh clones
- Add function_exists('get_field') checks in schema hooks so the site does
  not fatal when ACF is inactive (front page does not use ACF)
Config-driven registration, local CPT for offices, docs + seed for evaluators.
@PedroPLSR
PedroPLSR requested a review from steinbachr June 29, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant