워드프레스 기본폴더 만들기 – 2
E, Rhymix, 그리고 그누보드 모두 스킨이나 테마를 만들 때는 기본 테마나 스킨을 활용하는 것이 작업하기에 편리합니다.
하지만 불필요한 군더더기 없이 꼭 필요한 내용만 담긴 테마나 스킨을 찾기가 쉽지 않았습니다.
그래서 구글링을 하면서, 다른 사람들도 활용할 수 있는 기본 테마를 직접 만들어 보았습니다.
파일 구성은 basictheme 라는 폴더명에 style.css
, functions.php
, index.php
, header.php
, footer.php
, sidebar.php
파일로 이루어져 있습니다.
style.css
/*
Theme Name: Basic Theme
Theme URI: https://doorweb.net/
Author: Your Name
Author URI: https://doorweb.net/
Description: A basic WordPress theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: basictheme
*/
funtion.php
<?php
function basictheme_setup() {
// 테마 지원 추가
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
add_theme_support('custom-logo');
// 메뉴 등록
register_nav_menus(array(
'primary' => __('Primary Menu', 'basictheme'),
));
}
add_action('after_setup_theme', 'basictheme_setup');
function basictheme_enqueue_styles() {
wp_enqueue_style('basictheme-style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'basictheme_enqueue_styles');
index.php
<?php get_header(); ?>
<div id="content">
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
the_title('<h2>', '</h2>');
the_content();
endwhile;
else :
echo '<p>No content found</p>';
endif;
?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
header.php
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<header>
<h1><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></h1>
<nav>
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'menu_class' => 'nav-menu',
));
?>
</nav>
</header>
footer.php
<footer>
<p>© <?php echo date('Y'); ?> <?php bloginfo('name'); ?></p>
</footer>
<?php wp_footer(); ?>
</body>
</html>
sidebar.php
<aside>
<?php if (is_active_sidebar('main-sidebar')) : ?>
<?php dynamic_sidebar('main-sidebar'); ?>
<?php endif; ?>
</aside>
테마 다운로드
Regenerate Thumbnails
썸네일 크기를 다시 조정해야 할 때 유용하게 활용할 수 있는 플러그인입니다

Elementor #3176
워드프레스 기본폴더 만들기 – 1
워드프레스를 활용해 일반적인 사이트를 제작하려는 경우, 기존에 판매되는 유료 테마를 사용하는 것을 추천드립니다. 저도 보통 Astra라는 유료 테마를 사용해 사이트를 제작하는데요, 이 테마의 장점은 제작 과정이 쉽고, 어느 정도 빠른 속도를 보장해 준다는 점입니다.
다만, 홈페이지 제작을 직업으로 하다 보니, 회사용 사이트처럼 많은 기능이 필요하지 않은 경우가 많습니다. 배포된 테마들은 다양한 기능을 제공하기 위해 많은 코드를 포함하고 있지만, 사용자 입장에서는 불필요한 기능일 때가 종종 있습니다.
그래서 저는 필요한 기능만 담고, 가볍게 사용할 수 있는 테마가 더 적합하다는 생각을 하게 되었습니다. 특히 사이트의 홈에서 배너나 슬라이드 이미지를 쉽게 변경할 수 있으면서도, 유료 테마보다 더 가벼운 테마를 제작하는 것이 목적입니다.

안녕하세요!
워드프레스에 오신 것을 환영합니다. 이것은 첫 글입니다. 바로 편집하거나 삭제한 다음 쓰기 시작하세요!