Communitygithub.com

워드프레스 테마 제작

정적 HTML/CSS/JS 디자인을 클라이언트가 편집할 수 있는 맞춤형 워드프레스 테마로 변환합니다. 테마 구조, theme.json, 스크립트 등록, 블록 패턴, 커스텀 포스트 타입 및 편집 가능한 콘텐츠를 다룹니다. 디자인이나 정적 사이트를 워드프레스로 전환하거나, 커스텀/블록 테마를 구축하거나, 구텐베르크에서 섹션을 편집 가능하게 만들거나, GSAP 등의 스크립트를 테마에 적절히 추가하거나, 테마 편집 내용이 사라지거나 콘텐츠가 하드코딩된 이유를 물을 때 사용하세요.

워드프레스 테마 제작란 무엇인가요?

이 스킬은 정적 HTML/CSS/JS 디자인을 완전한 기능의 워드프레스 테마로 변환하는 방법을 설명합니다. 디자인은 코드에 고정되고 콘텐츠는 편집기에서 편집 가능한 상태를 목표로 합니다. 블록 테마, 하이브리드 클래식 테마, 차일드 테마 중에서 프로젝트 요구에 맞는 접근 방식을 선택할 수 있습니다. 테마 구조 설정, theme.json을 통한 디자인 토큰 이동, 애니메이션 스크립트를 포함한 애셋 등록, 블록 패턴 및 커스텀 필드를 통한 콘텐츠 편집 가능성 구현에 대한 단계별 지침을 제공합니다. Claude Code, Cursor, Codex와 같은 AI 에이전트와 함께 사용할 수 있어 워드프레스 개발 프로세스를 간소화하고, 하드코딩된 콘텐츠로 인한 반복적인 클라이언트 요청을 방지할 수 있습니다. 또한 애니메이션을 워드프레스에 통합하는 방법, 캐싱 플러그인과의 호환성, 인계 전 체크리스트 등 실용적인 팁도 포함되어 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/imperfec-t/webcraft/tree/HEAD/skills/wordpress-theme-build

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

WordPress 테마 제작

목표는 디자인은 코드에 고정되고 콘텐츠는 편집기에서 편집 가능한 테마입니다. 템플릿에 하드코딩된 텍스트는 클라이언트가 사소한 수정을 위해 다시 찾아오는 가장 흔한 이유입니다.

접근 방식 선택

접근 방식선택 시점
블록 테마 (theme.json, HTML 템플릿)새 구축, 클라이언트가 사이트 편집기에서 편집, 콘텐츠는 대부분 표준 블록으로 구성
하이브리드 클래식 테마 (PHP 템플릿 + theme.json 및 블록 패턴)정확한 HTML 제어가 필요한 복잡한 커스텀 마크업 또는 무거운 애니메이션
차일드 테마기존 테마 수정 시; 업데이트 시 덮어쓰기 때문에 부모 테마를 직접 편집하지 마십시오

애니메이션이 포함된 디자인 중심 마케팅 사이트의 경우 하이브리드 접근 방식이 일반적으로 실용적입니다. PHP로 정확한 마크업을 작성하고, 패턴, 필드 및 블록 편집기를 통해 콘텐츠를 편집 가능하게 만듭니다.

최소 구조

my-theme/
├── style.css            # 테마 헤더 주석 (필수)
├── functions.php        # 설정, 등록, 초기화
├── theme.json           # 팔레트, 타입 스케일, 간격, 레이아웃 너비
├── index.php            # 폴백 템플릿 (클래식/하이브리드)
├── front-page.php       # 홈페이지
├── header.php  footer.php
├── template-parts/      # 섹션당 하나의 파일
├── patterns/            # 블록 패턴 (자동 등록)
├── assets/css  assets/js  assets/media
└── screenshot.png       # 1200x900

style.css 헤더:

/*
Theme Name: My Theme
Author: Your Name
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: my-theme
*/

변환 워크플로우

  1. 정적 빌드를 고정합니다. HTML, CSS, JS를 먼저 완료하고 검증합니다. 변경 중인 대상을 변환하면 작업량이 두 배가 됩니다.
  2. 부분으로 분할합니다. 헤더와 푸터는 wp_head() 및 wp_footer()와 함께 header.php 및 footer.php로 이동합니다. 각 홈페이지 섹션은 template-parts/ 디렉토리의 파일이 되며, get_template_part()로 로드됩니다.
  3. 토큰을 theme.json으로 이동합니다. (팔레트, 글꼴 크기, 간격, 콘텐츠 너비) 편집기가 프론트엔드와 동일한 선택지를 표시하도록 합니다. CSS 사용자 정의 속성과 동일한 값을 유지하십시오. WordPress는 --wp--preset--* 변수를 생성하며, 이를 별칭으로 사용할 수 있습니다. webcraft CLI를 사용할 수 있는 경우, webcraft tokens "#brand" --format theme-json -o theme.json 명령은 tokens.css와 동일한 값으로 버전 3 파일을 작성합니다.
  4. 애셋을 등록하고, 절대 하드코딩하지 마십시오:
add_action('wp_enqueue_scripts', function () {
    $v = wp_get_theme()->get('Version');
    $uri = get_theme_file_uri('assets');
    wp_enqueue_style('my-theme', "$uri/css/main.css", [], $v);
    wp_enqueue_script('gsap', "$uri/js/vendor/gsap.min.js", [], '3', ['strategy' => 'defer', 'in_footer' => true]);
    wp_enqueue_script('my-theme', "$uri/js/main.js", ['gsap'], $v, ['strategy' => 'defer', 'in_footer' => true]);
});

가능하면 CDN보다 라이브러리를 로컬에 번들링하십시오. 타사 요청과 동의 문제를 피할 수 있습니다. 5. 콘텐츠를 편집 가능하게 만듭니다. 섹션별로 선택:

  • 자체 페이지가 있는 반복 항목(서비스, 포트폴리오, 사용후기): WP_Query로 쿼리되는 커스텀 포스트 타입.
  • 일회성 섹션 텍스트 및 이미지: 클라이언트가 삽입하고 편집하는 블록 패턴 또는 커스텀 필드.
  • 전역 항목(전화번호, 소셜 링크, 푸터 텍스트): 커스터마이저 또는 작은 옵션 페이지.
  • 내비게이션: register_nav_menus() 및 wp_nav_menu().
  1. 출력 시 모든 것을 이스케이프 처리합니다: esc_html(), esc_attr(), esc_url(), 리치 텍스트의 경우 wp_kses_post(). 문자열을 텍스트 도메인과 함께 __() 또는 esc_html__()로 래핑합니다.
  2. 이미지: wp_get_attachment_image()를 사용하여 srcset, sizes, 치수 및 지연 로딩이 생성되도록 합니다. add_image_size()로 필요한 크기를 등록합니다.
  3. 테마 지원: title-tag, post-thumbnails, editor-styles, responsive-embeds, html5, wp-block-styles.

WordPress 내 애니메이션

  • 콘텐츠를 숨기는 스크립트는 블록 편집기에서 실행되어서는 안 됩니다. 프론트엔드에서만 등록하십시오(wp_enqueue_scripts, enqueue_block_assets 아님).
  • 관리자 바는 고정 헤더를 32px(모바일에서는 46px) 밀어냅니다. body.admin-bar .header { top: var(--wp-admin--admin-bar--height, 32px); }로 오프셋을 조정합니다.
  • JS를 지연시키거나 결합하는 캐싱 및 최적화 플러그인은 로드 순서를 깨뜨릴 수 있습니다. 종속성을 올바르게 선언하여 존중되도록 하고, 플러그인이 활성화된 상태에서 테스트하십시오.
  • 편집기에서 추가된 콘텐츠에는 애니메이션 속성이 없습니다. JS에서 블록 클래스별로 애니메이션을 적용하거나, 속성이 포함된 패턴을 제공하십시오.

하지 말아야 할 것

  • WordPress 코어 또는 부모 테마를 편집하지 마십시오.
  • 테마 전환 시 유지되어야 하는 기능(커스텀 포스트 타입, 단축 코드)을 클라이언트가 테마를 변경할 수 있는 경우 테마에 넣지 마십시오. 작은 플러그인이 올바른 위치입니다.
  • 루프 내에서 재설정 없이 쿼리하지 마십시오(wp_reset_postdata()).
  • WP_DEBUG 알림이 있는 상태로 배송하지 마십시오. WP_DEBUG를 켜고 개발하십시오.
  • 재배포를 허용하지 않는 라이선스의 유료 플러그인 또는 애셋을 번들링하지 마십시오.

인계 체크리스트

  • 클라이언트가 코드를 건드리지 않고 모든 표시 텍스트, 이미지, 메뉴 항목 및 연락처 세부 정보를 변경할 수 있습니다.
  • 설정, 읽기 아래에 홈페이지가 설정되어 있고, 고유주소가 글 이름으로 설정되어 있습니다.
  • 파비콘(사이트 아이콘), 404 템플릿, 검색 템플릿, 개인정보 보호 페이지가 있습니다.
  • 스크린샷이 포함된 한 페이지짜리 편집 가이드가 있습니다.
  • 그런 다음 launch-qa 스킬을 실행합니다.

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

design-tokens

Create a website's visual system as CSS custom properties, covering color palette, typography scale, spacing, radius and shadows, with contrast checked. Use this whenever someone asks for a color scheme, a palette from one brand color, font pairing, a type scale, "make it look consistent", dark mode, a rebrand of an existing site into new colors, or starts a build with no defined styles.

hero-section

Design and build the hero (first screen) of a website, including headline layout, media treatment, CTA, proof badge, marquee and entrance animation. Use this whenever someone asks for a hero section, a landing page header, "the top of my homepage", a cinematic or animated intro, a video background, a text marquee, or says their first screen looks plain or generic.

homepage-blueprint

Plan the section structure and content slots of a homepage for an agency, freelancer, studio or service business before any design or code. Use this whenever someone asks "what sections should my homepage have", "plan my website", "structure a landing page for my business", wants a wireframe or sitemap for a service site, or starts building a homepage without a clear outline.

launch-qa

Run a pre-launch quality check on a website covering performance, accessibility, SEO basics, forms, cross-device behavior and content, and report findings ranked by severity with fixes. Use this whenever someone says a site is "ready to launch", "going live", asks "can you check my site", wants a QA pass, a website audit, a Lighthouse-style review, or wants to know why a page is slow or scoring badly.

responsive-layout

Build page layouts that work from phones to wide desktops using CSS grid, flexbox, container queries and fluid sizing, including card grids, bento grids, split sections, sticky sidebars and navigation that collapses. Use this whenever someone says their site "breaks on mobile", asks for a responsive grid, a bento layout, a mobile menu, fixing horizontal scroll or overflow, or is laying out any multi-column section.

scroll-motion

Add scroll-driven and entrance animation to a website with GSAP, ScrollTrigger and Lenis, including reveals, parallax, pinned sections, horizontal scroll, line drawing, counters and preloaders. Use this whenever someone wants a site to "feel premium", asks for smooth scrolling, scroll animations, parallax, text reveals, a pinned or sticky scroll section, an animated preloader, or names GSAP, ScrollTrigger, Lenis, Locomotive or AOS.

site-teardown

Analyze a live website and turn it into a section-by-section build brief that another person or AI can rebuild from, with brand name, colors, fonts and images swapped for placeholders. Use this whenever someone shares a URL and says "analyze this site", "make something like this", "give me a prompt to build this", "recreate this effect", "clone the layout with my branding", or asks how a page's animation or structure works, even if they never say "teardown".

website-workflow

Plan and sequence a whole website build, from structure through design, code, WordPress and launch, by routing each stage to the right webcraft skill. Use this when someone asks to "build me a website", "design my site from scratch", "redo our homepage", wants an end-to-end plan for a marketing, agency, studio or service site, or the request spans more than one of structure, look, layout, motion, CMS and QA.

관련 스킬