차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
tech:워드프레스_테마_제작 [2016/04/28 03:59] – 만듦 V_Ltech:워드프레스_테마_제작 [2016/07/12 00:56] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
 +{{tag>워드프레스 테마 제작}}
 ====== 워드프레스 테마 제작 ====== ====== 워드프레스 테마 제작 ======
  
줄 8: 줄 9:
   <head>   <head>
     <meta charset="<?php bloginfo('charset'); ?>">     <meta charset="<?php bloginfo('charset'); ?>">
-    <title><?php bloginfo('name'); ?> <?php wp_title('|'); ?></title> +    <title><?php bloginfo('name'); //현재 보여주는 페이지에 맞는 제목 ?> <?php wp_title('|'); ?></title> 
-    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">+    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); //style.css와 연결 ?>">
     <?php wp_head(); ?>     <?php wp_head(); ?>
   </head>   </head>
줄 16: 줄 17:
   </body>   </body>
 </html> </html>
 +</file>
 +
 +=====함수=====
 +====글 정보====
 +
 +
 +  * 날짜 : get_the_date (http://codex.wordpress.org/Template_Tags/get_the_date)
 +  * 시간 : get_the_time (http://codex.wordpress.org/Template_Tags/get_the_time)
 +  * 작성자 : the_author (http://codex.wordpress.org/Function_Reference/the_author)
 +  * 카테고리 : the_category (http://codex.wordpress.org/Function_Reference/the_category)
 +  * 태그 : the_tags (http://codex.wordpress.org/Function_Reference/the_tags)
 +  * 글요약 : the_excerpt() 
 +
 +<file php>
 +<?php if ( is_home() || is_category() || is_tag() ) {
 +    the_excerpt();
 +  
 +} else {
 +    the_content();
 +} ?>
 +</file>
 +이렇게 하면 첫화면 등에서는 요약글이 나오고, 포스트 제목을 클릭하면 포스트 내용 전체가 나온다.
 +[[http://codex.wordpress.org/Conditional_Tags| Conditional Tag]] 참조
 +
 +=====functions.php=====
 +
 +기능의 사용 여부를 정하거나 여러 설정을 하는 파일임
 +
 +<file>
 +<?php
 +  // Thumbnails
 +  add_theme_support( 'post-thumbnails' );
 +?>
 </file> </file>
  
줄 21: 줄 55:
  
 =====같이 보기===== =====같이 보기=====
 +  http://www.cmsfactory.net/node/10237
  
  
-{{tag>워드프레스 테마 제작}}