SlideShare une entreprise Scribd logo
1  sur  8
Divi Custom Post Type
Template
#WPxGangnam
강동혁
(donghyeok@shoplic.kr)
Theme Custom Post Type templates
• single-{post-type}.php
• archive-{post-type}.php
• search.php
• index.php
출처) https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/
Two custom post types
• 강의 • 템플릿
제목: WPxGangnam
날짜: 2019-06-17
시간: 저녁 7시
장소: 마이워크스페이스
강사: 고재영, 강동혁
사진:
설명:
사진
제목:
날짜:
시간:
장소:
강사:
<설명>
사진
제목: WPxGangnam
날짜: 2019-06-17
시간: 저녁 7시
장소: 마이워크스페이스
강사: 고재영, 강동혁
Elementor 소개
Divi Custom Post Type Template
Live WordPressing
1. Divi child theme
2. Custom Post Type UI, Advanced Custom Fields 플러그인 설
치
3. CPT 강의, 템플릿 생성
4. Divi 빌더 설정
5. 강의 필드 생성
6. 템플릿 생성
7. 강의 생성
8. 템플릿 PHP 파일 생성 – single-class.php
single.php
<?php get_header(); ?>
<div id="main-content">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php
the_content();
?>
</div> <!-- .entry-content -->
</article> <!-- .et_pb_post -->
<?php endwhile; ?>
</div> <!-- #main-content -->
<?php get_footer();
single-class.php
<?php get_header(); ?>
<div id="main-content">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php
// the_content();
$page = get_page_by_path('class-template', OBJECT, 'template');
echo apply_filters('the_content', $page->post_content );
?>
</div> <!-- .entry-content -->
</article> <!-- .et_pb_post -->
<?php endwhile; ?>
</div> <!-- #main-content -->
<?php get_footer();

Contenu connexe

Tendances (7)

워드프레스 운영 및 활용강좌
워드프레스 운영 및 활용강좌워드프레스 운영 및 활용강좌
워드프레스 운영 및 활용강좌
 
개발자로써 갖춰야할 스킬들 - 최용호
개발자로써 갖춰야할 스킬들 - 최용호개발자로써 갖춰야할 스킬들 - 최용호
개발자로써 갖춰야할 스킬들 - 최용호
 
워드프레스 기초 (ABCD) #2
워드프레스 기초 (ABCD) #2워드프레스 기초 (ABCD) #2
워드프레스 기초 (ABCD) #2
 
워드프레스 기본개념 및 가이드
워드프레스 기본개념 및 가이드워드프레스 기본개념 및 가이드
워드프레스 기본개념 및 가이드
 
S1.part.2.워드프레스 테마 시작하기
S1.part.2.워드프레스 테마 시작하기S1.part.2.워드프레스 테마 시작하기
S1.part.2.워드프레스 테마 시작하기
 
워드프레스 웹사이트 제작 가이드
워드프레스 웹사이트 제작 가이드워드프레스 웹사이트 제작 가이드
워드프레스 웹사이트 제작 가이드
 
블로그아카데미 소개서 최신버젼
블로그아카데미 소개서 최신버젼블로그아카데미 소개서 최신버젼
블로그아카데미 소개서 최신버젼
 

Similaire à Divi custom post type template

검색엔진최적화 박상혁
검색엔진최적화 박상혁검색엔진최적화 박상혁
검색엔진최적화 박상혁
Sanghyeok Park
 
[02회][제대로워드프레스][세미나]
[02회][제대로워드프레스][세미나][02회][제대로워드프레스][세미나]
[02회][제대로워드프레스][세미나]
블로그코디
 

Similaire à Divi custom post type template (20)

검색엔진최적화 박상혁
검색엔진최적화 박상혁검색엔진최적화 박상혁
검색엔진최적화 박상혁
 
김찬웅_그룹웨어에 새 에너지를_NDC15
김찬웅_그룹웨어에 새 에너지를_NDC15김찬웅_그룹웨어에 새 에너지를_NDC15
김찬웅_그룹웨어에 새 에너지를_NDC15
 
Dynamic Word Cloud Using Word2Vec - 2nd Presentation
Dynamic Word Cloud Using Word2Vec - 2nd PresentationDynamic Word Cloud Using Word2Vec - 2nd Presentation
Dynamic Word Cloud Using Word2Vec - 2nd Presentation
 
Prepo
PrepoPrepo
Prepo
 
WordCamp 2012 Seoul - Plugin
WordCamp 2012 Seoul - PluginWordCamp 2012 Seoul - Plugin
WordCamp 2012 Seoul - Plugin
 
Custom Xcode Template (with VIPER)
Custom Xcode Template (with VIPER)Custom Xcode Template (with VIPER)
Custom Xcode Template (with VIPER)
 
Team project(with reactnative)
Team project(with reactnative)Team project(with reactnative)
Team project(with reactnative)
 
Web micro blog
Web micro blogWeb micro blog
Web micro blog
 
XE Open seminar 테마만들기
XE Open seminar 테마만들기XE Open seminar 테마만들기
XE Open seminar 테마만들기
 
my activities before getting a job
my activities before getting a jobmy activities before getting a job
my activities before getting a job
 
Django를 Django답게, Django로 뉴스 사이트 만들기
Django를 Django답게, Django로 뉴스 사이트 만들기Django를 Django답게, Django로 뉴스 사이트 만들기
Django를 Django답게, Django로 뉴스 사이트 만들기
 
그레이들(Gradle)로 만드는 안드로이드 요리법
그레이들(Gradle)로 만드는 안드로이드 요리법그레이들(Gradle)로 만드는 안드로이드 요리법
그레이들(Gradle)로 만드는 안드로이드 요리법
 
GitHub와 Jekyll을 이용한 무료 블로그 만들기
GitHub와 Jekyll을 이용한 무료 블로그 만들기GitHub와 Jekyll을 이용한 무료 블로그 만들기
GitHub와 Jekyll을 이용한 무료 블로그 만들기
 
블로터 특강 - 워드프레스 잘 쓰고 계신가요?
블로터 특강 - 워드프레스 잘 쓰고 계신가요?블로터 특강 - 워드프레스 잘 쓰고 계신가요?
블로터 특강 - 워드프레스 잘 쓰고 계신가요?
 
5조_최종발표.pptx
5조_최종발표.pptx5조_최종발표.pptx
5조_최종발표.pptx
 
Rfp1
Rfp1Rfp1
Rfp1
 
과정 커리큘럼
과정 커리큘럼과정 커리큘럼
과정 커리큘럼
 
프로젝트 관리 및 지켜야 할 사항들
프로젝트 관리 및 지켜야 할 사항들프로젝트 관리 및 지켜야 할 사항들
프로젝트 관리 및 지켜야 할 사항들
 
tumblr.com 에 대한 DB구조 분석
tumblr.com 에 대한 DB구조 분석tumblr.com 에 대한 DB구조 분석
tumblr.com 에 대한 DB구조 분석
 
[02회][제대로워드프레스][세미나]
[02회][제대로워드프레스][세미나][02회][제대로워드프레스][세미나]
[02회][제대로워드프레스][세미나]
 

Plus de Donghyeok Kang (8)

My second word press plugin
My second word press pluginMy second word press plugin
My second word press plugin
 
My first word press plugin
My first word press pluginMy first word press plugin
My first word press plugin
 
Docker based web hosting
Docker based web hostingDocker based web hosting
Docker based web hosting
 
Flutter Beta but Better and Better
Flutter Beta but Better and BetterFlutter Beta but Better and Better
Flutter Beta but Better and Better
 
Java Annotation과 MyBatis로 나만의 ORM Framework을 만들어보자
Java Annotation과 MyBatis로 나만의 ORM Framework을 만들어보자Java Annotation과 MyBatis로 나만의 ORM Framework을 만들어보자
Java Annotation과 MyBatis로 나만의 ORM Framework을 만들어보자
 
워드프레스 플러그인 개발 입문
워드프레스 플러그인 개발 입문워드프레스 플러그인 개발 입문
워드프레스 플러그인 개발 입문
 
Curated News Platform
Curated News PlatformCurated News Platform
Curated News Platform
 
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
 

Divi custom post type template

  • 1. Divi Custom Post Type Template #WPxGangnam 강동혁 (donghyeok@shoplic.kr)
  • 2.
  • 3. Theme Custom Post Type templates • single-{post-type}.php • archive-{post-type}.php • search.php • index.php 출처) https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/
  • 4. Two custom post types • 강의 • 템플릿 제목: WPxGangnam 날짜: 2019-06-17 시간: 저녁 7시 장소: 마이워크스페이스 강사: 고재영, 강동혁 사진: 설명: 사진 제목: 날짜: 시간: 장소: 강사: <설명>
  • 5. 사진 제목: WPxGangnam 날짜: 2019-06-17 시간: 저녁 7시 장소: 마이워크스페이스 강사: 고재영, 강동혁 Elementor 소개 Divi Custom Post Type Template
  • 6. Live WordPressing 1. Divi child theme 2. Custom Post Type UI, Advanced Custom Fields 플러그인 설 치 3. CPT 강의, 템플릿 생성 4. Divi 빌더 설정 5. 강의 필드 생성 6. 템플릿 생성 7. 강의 생성 8. 템플릿 PHP 파일 생성 – single-class.php
  • 7. single.php <?php get_header(); ?> <div id="main-content"> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-content"> <?php the_content(); ?> </div> <!-- .entry-content --> </article> <!-- .et_pb_post --> <?php endwhile; ?> </div> <!-- #main-content --> <?php get_footer();
  • 8. single-class.php <?php get_header(); ?> <div id="main-content"> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-content"> <?php // the_content(); $page = get_page_by_path('class-template', OBJECT, 'template'); echo apply_filters('the_content', $page->post_content ); ?> </div> <!-- .entry-content --> </article> <!-- .et_pb_post --> <?php endwhile; ?> </div> <!-- #main-content --> <?php get_footer();