Upload
minhyeong-lim
View
2.393
Download
6
Embed Size (px)
DESCRIPTION
한국 워드프레스 사용자 모임이 주최한 워드프레스 미트업에서 테마를 주제로 강의한 PPT 자료입니다.
Citation preview
WordPress Theme
By 임민형 @[email protected]
http://ssamture.net
WordPress Meetup2012.11.17
(http://kopress.kr)
미리보기
워드프레스 테마테마 구조테마 디자인템플릿
워드프레스 테마
워드프레스 테마
워드프레스 사이트의 내용을 그래픽 인터페이스로 생성하기 위한 파일들의 모음기본 소프트웨어 수정 없이 사이트가 표시되는 방식을 수정
워드프레스 테마
wordpress.org/extend/theme
워드프레스 테마
wootehems.com
워드프레스 테마
themetrust.com
워드프레스 테마
www.studiopress.com
워드프레스 테마
www.studiopress.com
워드프레스 테마
themeforest.net
워드프레스 테마
유료테마 구입 전– 지원하고 있는 기능 살펴보기– 미리보기 살펴보기– 구축하고자 하는 컨텐츠와 비교
워드프레스 테마
테마의 커스터마이징차일드 테마 개발테마 개발
워드프레스 테마의 구성
워드프레스 테마의 구성
/wp-content/themes2 개의 템플릿(style.css + index.php)
템플릿
템플릿
PHP 소스 파일사이트 요청자에게 HTML 로 출력워드프레스 코어는 템플릿 파일을 조각처럼 맞춰 사이트 방문자에게 제공
템플릿 계층 구조
템플릿 요청 흐름
카테고리 목록 요청 시
차일드 테마
차일드 테마
원본 테마를 상속필요한 부분만 수정하거나 추가
차일드 테마
차일드 테마가 상속 받을 부모 테마 템플릿 지정
차일드 테마
차일드 테마
차일드 테마
차일드 테마
일반적인 워드프레스 디자인
워드프레스 디자인
header
(nav)
content sidebar
footer
워드프레스 디자인header
content
sidebar
footer
HTML 만들기title
sidebar
content
Comment list
Comment form
템플릿
템플릿 파일 (index.php)
Index.php header.php
sidebar.php
footer.php
템플릿 파일 (single.php)
header.php
sidebar.php
footer.php
single.php
comment.php
index.php 예제
single_cat_title()
the_post_thumbnail()
the_title()
the_exerpt()
the_category(),the_author(), the_date()
Single.php 예제
the_content()
functions.php
테마에서 사용하는 함수들을 위한 파일테마 활성화 시 자동으로 로드썸네일 활성화메뉴 활성화사이드바사용자 정의 배경화면 등
functions.php
register_sidebarregister_nav_menusadd_theme_support( ‘post-thumbnails’ )
404.php
잘못된 요청 시 보여주는 템플릿해당 파일이 없다면 index.php 호출단순하지만 꼭 필요한 템플릿 파일
그 밖의 템플릿 파일
comments.phppage.phpfront-page.phphome.phpsingle.phpcategory.phptag.phparchive.php 등
page 템플릿 활용
특별한 기능을 제공할 때특별한 디자인을 제공 할 때
page 템플릿 활용
템플릿을 위한 PHP 파일 생성 후 상단에 기재Teplate name : 템플릿 명유의 사항WP V 3.4 미만 에서는 테마 상위 폴더에 위치- / 테마 / 템플릿 파일 .php(O)- / 테마 / 서브디렉토리 / 템플릿 파일 .php(x)
page 템플릿 활용
템플릿을 위한 PHP 파일 생성 후 상단에 기재Teplate name : 템플릿 명유의 사항WP V 3.4 미만 에서는 테마 상위 폴더에 위치- / 테마 / 템플릿 파일 .php(O)- / 테마 / 서브디렉토리 / 템플릿 파일 .php(x)
템플릿 태그
일반적인 템플릿 태그
get_headerget_footerget_sidebarget_template_partget_search_formbloginfowp_title
Author 태그
the_author
Category 태그
The_category, The_tags
Comment 태그
Wp_list_commentsComment_form
Content 태그
The_permalinkThe_titleThe_contentThe_excerptThe__post_thumbnail
커스텀 포스트 타입을 위한 템플릿
커스텀 포스트 타입을 위한 템플릿
single-{post_type}.phparhcive-{post_type}.php
single.php single-{post_type}.php
대화 – 질문 - 토론
끝 , 감사합니다 .
한국 워드프레스 사용자 모임 – 임민형 (ssamture)