Skip to content

Challenges 1 & 2: Pugbnb front page + Pug & Puggle backend schema - #23

Open
J-C-S-V wants to merge 13 commits into
masterfrom
feature/juan-the-pug
Open

Challenges 1 & 2: Pugbnb front page + Pug & Puggle backend schema#23
J-C-S-V wants to merge 13 commits into
masterfrom
feature/juan-the-pug

Conversation

@J-C-S-V

@J-C-S-V J-C-S-V commented Apr 28, 2026

Copy link
Copy Markdown

Summary

Challenge 1 — Front page

  • Header / nav, search bar, hero section, and featured-cards grid built with Tailwind.
  • Featured cards driven by a data file (theme/inc/data/featured-cards.php) and rendered via a reusable template-parts/featured-card.php partial — no hardcoded markup in front-page.php.

Challenge 2 — Backend schema

1. Plugins

  • The schema itself lives in a custom plugin at challenge-2/plugins/pug-puggle-schema/, not in the theme. Reason: content schema should outlive the theme — if the theme is swapped, the post types and stored data persist.

2. Custom Post Types (registered in plugins/pug-puggle-schema/cpt/)

Slug Hierarchical Why
practice-area yes Service offerings; existing widget pages parent→children via post_parent
team no Attorney profiles ("Attorney" via canonical map in inc/utils/posts.php)
testimonial no Drives Schema.org Review markup
office no Physical firm locations; drives LocalBusiness schema
local yes Area-served landing pages; supports region → city/PA nesting referenced by commented code in services/locations.php
result no Case verdicts/settlements
faq no Editor-managed Q&A; drives FAQPage schema

3. Taxonomies (registered in plugins/pug-puggle-schema/tax/)

Slug Attached to Why
area-served local, practice-area Geographic tagging; the commented tax_query in services/locations.php expects this taxonomy
faq-category faq Lets editors group FAQs and drives the FAQPage schema generator
attorney-role team Partner / Associate / Of Counsel — flat tagging

The built-in category taxonomy is attached to practice-area and local via their CPT registrations (the practice-areas widget queries it).

4. Project structure

  • One file per entity (cpt/practice-area.php, tax/area-served.php, etc.) wired through small all.php loaders. Greppable, easy to disable individually, mirrors the existing inc/widgets/ pattern.
  • All registrations on init (CPTs) and init (taxonomies) — correct hooks so rewrites resolve immediately.

Challenge 3

A bit rusty on this one, but still proud! Future updates on the way: better mobile experience, extra preset buttons, and more visual styles 🚀
https://github.com/J-C-S-V/button-builder

@steinbachr

@J-C-S-V
J-C-S-V requested a review from steinbachr April 28, 2026 04:41
@yitzshapiro

Copy link
Copy Markdown
Collaborator

@steinbachr This one is good for your review. Only thing flagged is the missing ACF guard in plugin challenge

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.

2 participants