워드프레스 / 테마 만들기 / 등록하고 활성화 하기

테마를 등록할 수 있는 최소한의 조건은 style.css와 index.php 두 개의 파일이다. 두 파일만 있으면 테마 목록에 나오고 활성화할 수 있다.

style.css에 테마 정보가 들어가고, index.php로 내용을 출력하는데, index.php에 아무런 내용이 없어도 등록과 활성화는 가능하다.

디렉토리 만들기

테마가 저장되는 위치는 /wp-content/themes이다. 그 디렉토리 안에 적당한 이름의 디렉토리를 만든다.

예를 들어 my-theme이라는 디렉토리를 만들었다면 /wp-content/themes/my-theme 안에 테마 파일들이 들어간다.

style.css 만들기

style.css에는 테마 정보가 들어간다고 했는데, 최소한의 정보는 테마 이름이다. 예를 들어 테마의 이름이 My Theme이라면 아래의 내용으로 style.css를 만든다.

/*
  Theme Name: My Theme
*/

만든이, 설명, URL 등 다양한 정보를 넣을 수 있다. 자세한 것은 아래 링크에서 볼 수 있다.

https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/

index.php 만들기

아무런 내용이 없는 index.php 파일을 만든다.

테마 활성화하기

이제 [외모 - 테마]에 My Theme이라는 테마가 보이고 활성화를 할 수 있다.

같은 카테고리의 다른 글
워드프레스 / 함수 / wp_is_mobile() / 모바일 접속 여부 판단하는 함수

워드프레스 / 함수 / wp_is_mobile() / 모바일 접속 여부 판단하는 함수

wp_is_mobile() wp_is_mobile()은 모바일 기기로 접속하면 true, 모바일 기기가 아니라면 false를 반환하는 함수이다. 모바일인지 아닌지 구분하는 기준은 $_SERVER 이다. wp_is_mobile()은 wp-includes/vars.php에 정의되어 있다. 예제 1 모바일이면 A를 출력한다. <?php if ( wp_is_mobile() ) { echo 'A'; } ?> 예제 2 모바일이 아니면 A를 출력한다. <?php if ( !wp_is_mobile() ) { echo 'A'; ...

법 / 소송 진행 과정 조회하는 방법, 판결서 조회하는 방법

법 / 소송 진행 과정 조회하는 방법, 판결서 조회하는 방법

소송 진행 과정 조회 소송이 어떻게 진행되고 있는지는 에서 확인할 수 있다. 필요한 것은 사건번호와 소송 당사자 이름. 특별한 인증 과정 없이 사건번호와 소송 당사자 이름만 알면 조회가 되는데, 그래도 되는 것인지 의아하다. 에 접속한다. 사건번호 등 정보를 입력하고 을 클릭한다. 에 전체 개요가 ...

브랜드 로고 공식 배포 주소

브랜드 로고 공식 배포 주소

로고를 다운로드 받을 수 있는 공식 주소를 정리한다. 로고 사용에 대한 가이드라인이 있으므로, 공식 주소에서 다운로드하는 것이 좋다. Bootstrap https://getbootstrap.com/docs/5.0/about/brand/ Facebook https://www.facebook.com/brand/resources/facebookapp/logo Facebook Messenger https://www.facebook.com/brand/resources/messenger/messenger-brand HTML5 https://www.w3.org/html/logo/ Intagram https://www.facebook.com/brand/resources/instagram/instagram-brand jQuery https://brand.jquery.org/logos/ Kakao Story Channel https://ch.kakao.com/login LinkedIn https://brand.linkedin.com/downloads MariaDB https://mariadb.com/about-us/logos/ Naver https://logoproject.naver.com/logonaver Naver Band https://developers.band.us/develop/guide/share Naver Line https://line.me/en/logo PHP https://www.php.net/download-logos.php Pinterest https://business.pinterest.com/ko/brand-guidelines/ Python https://www.python.org/community/logos/ Samsung https://www.samsung.com/sec/about-us/brand-identity/logo/ Sass https://sass-lang.com/styleguide/brand Twitter https://about.twitter.com/en/who-we-are/brand-toolkit Visual Studio Code https://code.visualstudio.com/brand YouTube https://www.youtube.com/howyoutubeworks/resources/brand-resources/  

CPU / 소켓(Socket)

CPU 소켓(CPU Socket)은 마더보드에 CPU를 장착할 수 있는 물리적 인터페이스입니다. 이는 CPU와 마더보드 간의 전기적 연결을 제공하며, CPU를 쉽게 교체하거나 업그레이드할 수 있도록 합니다. 다양한 CPU 소켓 유형이 존재하며, 특정 소켓은 특정 CPU 아키텍처 및 모델과 호환됩니다. CPU 소켓의 정의와 기능 정의 CPU 소켓은 CPU를 마더보드에 물리적으로 고정하고 전기적으로 연결하는 소켓입니다. 이는 CPU ...

리눅스 / 명령어 / which, whereis, locate / 명령어 위치 찾기

명령어의 위치를 찾을 때 사용할 수 있는 명령어에는 which, whereis, locate가 있다. 명령어의 위치만 찾을 때는 which를 사용하고, 관련된 파일들의 위치까지 찾을 때는 whereis나 locate를 사용한다. which 명령어로 find 명령어를 찾는다. # which find /usr/bin/find whereis 명령어로 find 명령어를 찾는다. # whereis find find: /usr/bin/find /usr/share/man/man1/find.1.gz locate 명령어로 find 명령어를 찾는다. # locate find /usr/bin/find /usr/bin/find2perl /usr/bin/findmnt /usr/bin/nl-link-ifindex2name /usr/bin/nl-link-name2ifindex /usr/bin/oldfind /usr/lib64/python2.7/modulefinder.py /usr/lib64/python2.7/modulefinder.pyc /usr/lib64/python2.7/modulefinder.pyo /usr/sbin/btrfs-find-root /usr/sbin/findfs /usr/share/bash-completion/completions/findmnt /usr/share/doc/findutils-4.5.11 /usr/share/doc/findutils-4.5.11/AUTHORS /usr/share/doc/findutils-4.5.11/COPYING /usr/share/doc/findutils-4.5.11/ChangeLog /usr/share/doc/findutils-4.5.11/NEWS /usr/share/doc/findutils-4.5.11/README /usr/share/doc/findutils-4.5.11/THANKS /usr/share/doc/findutils-4.5.11/TODO /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_find.py /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_stop_find.py /usr/share/info/find-maint.info.gz /usr/share/info/find.info.gz /usr/share/locale/be/LC_MESSAGES/findutils.mo /usr/share/locale/bg/LC_MESSAGES/findutils.mo /usr/share/locale/ca/LC_MESSAGES/findutils.mo /usr/share/locale/cs/LC_MESSAGES/findutils.mo /usr/share/locale/da/LC_MESSAGES/findutils.mo /usr/share/locale/de/LC_MESSAGES/findutils.mo /usr/share/locale/el/LC_MESSAGES/findutils.mo /usr/share/locale/eo/LC_MESSAGES/findutils.mo /usr/share/locale/es/LC_MESSAGES/findutils.mo /usr/share/locale/et/LC_MESSAGES/findutils.mo /usr/share/locale/fi/LC_MESSAGES/findutils.mo /usr/share/locale/fr/LC_MESSAGES/findutils.mo /usr/share/locale/ga/LC_MESSAGES/findutils.mo /usr/share/locale/gl/LC_MESSAGES/findutils.mo /usr/share/locale/hr/LC_MESSAGES/findutils.mo /usr/share/locale/hu/LC_MESSAGES/findutils.mo /usr/share/locale/id/LC_MESSAGES/findutils.mo /usr/share/locale/it/LC_MESSAGES/findutils.mo /usr/share/locale/ja/LC_MESSAGES/findutils.mo /usr/share/locale/ko/LC_MESSAGES/findutils.mo /usr/share/locale/lg/LC_MESSAGES/findutils.mo /usr/share/locale/lt/LC_MESSAGES/findutils.mo /usr/share/locale/ms/LC_MESSAGES/findutils.mo /usr/share/locale/nl/LC_MESSAGES/findutils.mo /usr/share/locale/pl/LC_MESSAGES/findutils.mo /usr/share/locale/pt/LC_MESSAGES/findutils.mo /usr/share/locale/pt_BR/LC_MESSAGES/findutils.mo /usr/share/locale/ro/LC_MESSAGES/findutils.mo /usr/share/locale/ru/LC_MESSAGES/findutils.mo /usr/share/locale/rw/LC_MESSAGES/findutils.mo /usr/share/locale/sk/LC_MESSAGES/findutils.mo /usr/share/locale/sl/LC_MESSAGES/findutils.mo /usr/share/locale/sr/LC_MESSAGES/findutils.mo /usr/share/locale/sv/LC_MESSAGES/findutils.mo /usr/share/locale/tr/LC_MESSAGES/findutils.mo /usr/share/locale/uk/LC_MESSAGES/findutils.mo /usr/share/locale/vi/LC_MESSAGES/findutils.mo /usr/share/locale/zh_CN/LC_MESSAGES/findutils.mo /usr/share/locale/zh_TW/LC_MESSAGES/findutils.mo /usr/share/man/man1/find.1.gz /usr/share/man/man1/find2perl.1.gz /usr/share/man/man1/oldfind.1.gz /usr/share/man/man8/btrfs-find-root.8.gz /usr/share/man/man8/findfs.8.gz /usr/share/man/man8/findmnt.8.gz locate 명령어는 -n 옵션으로 출력 ...

CPU / 내장 그래픽(Integrated Graphics)

CPU 내장 그래픽(Integrated Graphics)은 별도의 그래픽 카드 없이 CPU 자체에 그래픽 처리 기능을 통합한 기술입니다. 이 기술은 주로 인텔과 AMD에서 제공하는 다양한 CPU 모델에서 찾아볼 수 있습니다. 내장 그래픽은 주로 일반적인 컴퓨팅 작업과 가벼운 게임, 미디어 소비 등에 사용되며, 고성능 그래픽 카드가 필요 없는 사용자에게 비용 효율적인 솔루션을 제공합니다. 이 ...

워드프레스 / 함수 / has_post_thumbnail() / 썸네일 존재 여부 체크하는 함수

워드프레스 / 함수 / has_post_thumbnail() / 썸네일 존재 여부 체크하는 함수

has_post_thumbnail()은 썸네일이 존재하는지 체크하는 함수이다. 썸네일이 있으면 TRUE를 반환한다. 썸네일이 있으면 A를 실행한다. <?php if ( has_post_thumbnail() ) : ?> A <?php endif; ?>

리눅스 / 명령어 / touch / 빈 파일 만들기, 최종 수정 시간 변경하기

touch는 빈 파일 만들거나 파일의 최종 수정 시간을 현재 시간으로 바꾸는 명령어이다. abc.txt 파일이 없다면, 내용이 없는 abc.txt 파일을 만듭니다. abc.txt 파일이 있다면, 파일의 최종 수정 시간을 현재로 변경합니다. # touch abc.txt

PuTTY / 소개

PuTTY / 소개

PuTTY는 원격 컴퓨터와의 통신을 위한 무료 오픈 소스 터미널 에뮬레이터 및 네트워크 파일 전송 응용 프로그램입니다. 주로 SSH, Telnet, rlogin, 및 SCP를 사용하여 네트워크를 통해 다른 컴퓨터에 접속하고 관리하는 데 사용됩니다. PuTTY는 Windows를 비롯한 다양한 운영 체제에서 사용할 수 있으며, 그 간편함과 기능성으로 인해 시스템 관리자 및 네트워크 엔지니어들 사이에서 ...

당구 / 메모

당구 / 메모

임계각 파란색을 따라 치면 회전을 더 주든 덜 주든 3쿠션 지점이 비슷하다. ①번처럼 파란색보다 큰 각인 경우 회전을 많이 줄수록 3쿠션 지점이 길어진다. ②번처럼 파란색보다 작은 각인 경우 회전을 덜 줄수록 3쿠션 지점이 길어진다.