Free Checking for Bloggers - Sign up in 5 Minutes! 블로거를위한 무료 점검 - 가입 5 분안에!
Powered by MaxBlogPress 문서 Powered by MaxBlogPress

WordPress의 해킹 # 18 : 해킹 Wordpress 템플릿 파일 | JTPRATT의 블로깅 실수
JTPratt의 블로깅 실수





Home » Wordpress Hack #18: Hacking Wordpress Template Files »Wordpress 해킹 # 18 : 해킹 Wordpress 템플릿 파일



Posted in: 에 게시됨 :

블로그 - 설치 카테고리 이미지카테고리 현금화 이미지WordPress의 카테고리 이미지워드 - 현서야 카테고리 이미지
3,727 views 3727 조회


Please note: This page was originally written in English. 주의 사항 :이 페이지는 원래 영어로 작성됐다.

The original post can be viewed 원본 게시물을 볼 수있습니다 here 여기에 .

Please note: This page was originally written in English.

The text has been translated using an online service such as Google or Babelfish.

The original post can be viewed here.


This tutorial will teach you the essentials about wordpress template files and their hierarchy when hacking your theme . 이 입문서는 당신에 대해 귀하의 테마를 해킹했을 때 그들의 계층 구조 템플릿 파일 WordPress의 본질을 가르치는 것입니다.

This post is part of 이 게시물의 일부입니다 30 Wordpress hacks in 30 days 30 일 안에 30 Wordpress 해킹 .

In my last Wordpress Hack 제 마지막 Wordpress 해킹 Templates for Alternate Sidebar Layouts 대체 사이드바 레이아웃에 대한 템플릿 I touched on how you can create a theme template file for a page that has different sidebars for the rest of your blog. 내가 얼마나 당신의 나머지 부분에 대한 다양한 주제로 블로그 사이드바가 한 페이지에 대한 템플릿 파일을 만들 수에 안착한 것이다. Answering some questions and comments for that article showed me that I need to write a more in-depth article about how the Wordpress Template Hierarchy Works and the choices you have available to your when you create custom template files. This article should change the way you think about your Wordpress theme FOREVER ! 몇 가지 질문을하고 그 기사에 대한 의견 예라고를 보여줬 내가 더 -에 대한 심층 기사를 작성해야하고 당신이 어떻게 Wordpress 계층 구조 템플릿 파일을 사용자 지정 서식 파일을 만들 때 사용할 수있어 선택했다. 방식을 변경해야이 문서 귀하의 Wordpress 테마를 정종에 대한 생각!

Wordpress is a blogging system that has greatly evolved over. 워드가 크게 발전하고있다 넘는 블로그 시스템이다. It’s evolved as much as bloggers and blogging itself has. 그것만큼 블로거로 진화하고 자체가 블로깅을하고있다. Now, you can use it as a full fledged “Content Management System”, you can even use it to create a static web site with no blog at all. 자, 당신들처럼 전체 깃털 "콘텐츠 관리 시스템", 심지어 전혀 블로그와 정적 웹 사이트를 만드는 데 쓸 수를 사용할 수있습니다. I would say that most of us use it as a blog, where the home page has a running “list of posts” from the newest to oldest. 나는 우리의 대부분은 어디 홈 페이지 "에 이르기까지 최신 오래된 게시물의 실행"목록을 가진 블로그로 사용한다고 말할 것이다. You can add those posts to “categories”, and now with Wordpress 2.3x+ you can also “tag” them. "카테고리", 그리고 지금 그 게시물을 추가할 수있습니다 Wordpress 2.3x + 수도 "태그"그들.

I’m going to explain to your how Wordpress works “out of the box”. 난 당신 Wordpress 작동 방법 "에있는 상자의 설명에"간다. Keep in mind that this blog has been heavily customized, and I don’t even have blog posts on my homepage anymore - I’ve moved them to “/blog” on this site (which is something you can change in your Wordpress dashboard under “Settings”). 명심하십시오 제작품이 블로그를 무겁게하고있다, 나는 내 홈페이지에 더 이상 블로그 게시물에도 필요 없어 - "그들이 이사했습니다 /"이 사이트에 블로그 (당신이 Wordpress 대시보드 아래에 변경할 수있는 무언가가있다 "설정").

When a web browser visits a Wordpress blog, the software looks in your theme directory (/wp-content/theme) for the assigned theme. Wordpress 블로그를 방문하면 웹 브라우저, 소프트웨어는 귀하의 테마 디렉토리에 보이는 (/ wp-content/theme) 할당된 테마. It’s either “default” (out of the box), or a custom one that you picked out and uploaded to your theme directory. 그것도 "기본 설정"상자 (아웃), 또는 사용자 한 당신과 당신의 테마 디렉토리에 업로드 골랐다. Wordpress then iterates through your theme files looking for which one to use in a specific order. WordPress의 테마를 통해 다음 반복을 찾고 파일을 특정 순서에 사용할 수있는 하나. That search order might change depending on what Wordpress has been asked to do (show the homepage, show a category page, show search results, show an archive page, etc.). 검색 순서를 어떻게 할 Wordpress 요구를 받아왔다에 따라 변경할 수도있습니다 (홈페이지 게재 카테고리 페이지에서 보여주는 검색 결과 표시, 아카이브 페이지를 표시 등). Your understanding of this search order (called the “template hierarchy”) is vitally important to your understanding of how Wordpress Themes work. 이 검색 질서의 이해 ( ""계층 구조 템플릿) vitally 테마 Wordpress 당신의 작품을 어떻게 이해하는 것이 중요합니다. If you understand the template hierarchy in Wordpress, you can build custom theme template files and make your blog 100 times more effective, indexable (by search engines), and in the end more profitable. 만약 당신이 Wordpress에, 당신과 당신의 블로그 템플릿 파일을 만들 수 100 배나 더 효과적으로 만들기 위해서, 색인 생성 검색 (엔진) 사용자 정의 테마 계층 구조 템플릿을 이해하고 결국에는 더 수익성이 높습니다.

The Wordpress Codex has an image of the template hierarchy WordPress의 Codex 국제 계층 구조 템플릿의 이미지가있다 that spells it all out. 그 밖의 모든 주문했다. Since that is too big for this page, I created a custom one that is a bit more simplistic for display here: 이후이 페이지에 대한 너무 큰이다, 나는 조금 더 단순하게 표시하기 위해 여기에있는 사용자 정의 하나를 만들어 :

페이지 계층 WordPress의 어떤 템플릿

When I said “simplistic”, I really meant it - didn’t I? 내가 "단순한", 정말 그 의미 -다고 했지, 아냐? As the pictures shows, when a web browser calls a site with Wordpress installed it asks itself “which (template) page do I need (to show the content)?” I’ll explain these php files in depth in a few minutes, but first generally Wordpress asks, is it a date.php (archive) page, is it a category page, is it a tag page, is it the “home” (or blog) page, is it a single (post) page, is it a Wordpress “page” (that you wrote), is it an error 404 (page not found) or seach page, and last is it some kind of attachment. 사진이 보여주는 바와 같이 사이트를 호출하면 웹 브라우저를 Wordpress "(템플릿 자체를 묻는다) 페이지가 설치된 전 ()은 콘텐츠 보여?"내가 몇 분 안에,하지만 깊이에서 php 파일이 필요합니까 설명해 줄게 일반적으로 Wordpress 먼저 물어 보면, 그것 (아카이브) 페이지, date.php은 그것 카테고리 페이지, 그것은 태그 페이지, 그것은 "홈"(또는 블로그) 페이지, (포스트) 페이지 하나입니다 그것은 Wordpress "페이지"(당신), 쓴 그것은 오류 404 (페이지를 찾을 수없습니다) 또는 검색 페이지, 그리고 마지막으로 첨부 파일의 일종 그것이다. You can see in the examples that if the right file is not found, with the exception of attachments, Wordpress will just default to the index.php to display what it needs. 당신은 예제에서 바로 파일을 찾을 수 없다면, 첨부 파일의 예외로서, Wordpress 그냥 index.php에게 무엇을 필요로 표시하도록 기본 설정됩니다 볼 수있습니다.

The Wordpress Home Page template or “home.php” 이 Wordpress 홈 페이지 또는 "home.php"템플릿

Now, let’s dig a little deeper - shall we? 자, 좀 더 깊이 파 보자 - 갈까요? Let’s say that you want to customize your “home” page of your Wordpress blog - the one that by default shows your blog posts. 그건 당신이 Wordpress 블로그의 "페이지 - 하나"라고하자 기본적으로 사용자 지정하려는 홈 블로그 게시물을 보여줍니다. MOST themes I’ve dealt with just use “index.php” to show your home page content. 난 그저 ""당신의 홈 페이지에 콘텐츠를 보여 대부분의 주제를 다루 index.php를 사용합니다. But if you look at the template hierarchy you see that the first page Wordpress looks for (for the home page) is “home.php”. 그러나 만약 당신이 그 첫 번째 페이지 Wordpress 홈 페이지 ()에 대해 "보는 계층에 대한 템플릿을 쳐다보지 home.php". Your theme may or may not contain this file. 귀하의 테마 또는이 파일이 포함되어 있지 않을 수도있습니다. If you don’t have one, just open index.php and “save as” home.php - customize it to your liking and now you have a custom theme home page template file. 만약 여러분이 단지 하나도 없어 index.php 열고 ""home.php - 당신이 마음에 들지로 저장하고 그것을 사용자 정의할 수있는 사용자 정의 테마 이제 홈 페이지 템플릿 파일. If you want your blog posts to be somewhere else other than your “home” page you will need to create a different template file for a “page” (instructions below), and then assign that “page” the proper template in “Manage->Pages-Pagename” in your Wordpress dashboard. 만일 당신의 블로그에 게시물을 다른 곳에서 다른 귀하의 "고향", 그리고 (아래 지침) "페이지에 대한 템플릿 파일을"다른 작성하려면 "페이지"템플릿에 "관리가 필요합니다 페이지를보다 적절한 할당되고 싶다 - > 페이지 - 페이지 "Wordpress 대시보드에있다. Then delete “home.php” and in your Wordpress dashboard “Settings”, assign a different page to home to display what you want. 다음 "home.php"를 삭제하고 귀하의 Wordpress 대시보드에서 "설정", 홈으로 당신이 원하는 표시하기 위해 다른 페이지를 할당합니다.

You should also read 당신도 읽어야한다 Wordpress Hack #1: Query Posts WordPress의 해킹 # 1 : 쿼리 게시물 , and , 그리고 Wordpress Hack #15: 12 Ways to Hack Your Home Page WordPress의 해킹 # 15 : 12 방법 귀하의 홈페이지 해킹 .

Wordpress Category Template Pages WordPress의 카테고리 페이지 템플릿

When you write a post you can assign it to a “category”, which is one way of organizing your content. 하면 "카테고리"는 귀하의 콘텐츠를 구성하는 하나의 방법입니다 그것을 할당할 수있는 게시물을 작성합니다. It’s also a way for your visitors to filter through your past content. 그것도 당신의 과거 콘텐츠를 필터링하는 방법을 통해 방문자. When your categories are listed in your sidebar, and you click on one, Wordpress will filter and show only posts that were assigned to that category. 카테고리 때 사이드바에, 그리고 하나를 클릭하면 해당 카테고리에 할당했다, Wordpress 필터링 및 표시에만 게시물이 나열됩니다. This is very handy. 이것은 매우 편리합니다. Wordpress has two ways it can show you post content on pages like this, one is an “excerpt” and the other is the full post. WordPress의 그것이 같은 페이지에 콘텐츠를 게시할 보여줄 수있는 두 가지 방법이있다, 하나는 "발췌"와 다른 하나는 전체 게시물입니다. Either way - you have some of the same content listed on this page as you do your (blog) home page, your archive (past post) pages, and (if you’re using them) also tag pages. 어느 쪽이든 - 당신이 당신의 (블로그 할 몇 가지 동일한 콘텐츠를 해당 페이지에 나와있는) 홈 페이지, 귀하의 아카이브 (게시물 과거) 페이지, 그리고 (해당되는 경우)도 태그 페이지들을 사용하고있습니다. This is a horrible, horrible thing to google as they see “duplicate content”. 이것은 그들이 "중복 콘텐츠를 볼 Google에 무섭고 끔찍한"입니다. That means that all your pages (while useful to visitors) like this probably won’t be indexed by google and may even count against you. 즉, 귀하의 모든 페이지 (하면서 방문자에게 유용)이 아마도 구글에 의해 색인에 추가되지 않습니다와 같은 의미조차 반대 셀 수있습니다.

Now, when it comes to google, and search engines in general - the object is to get as many pages as you can indexed. 이제 구글을 때, 그리고 일반적인 검색 엔진이 온다 - 개체를 원하는 수만큼 페이지로 색인을 수있다. The more pages indexed, the more chances you have of somebody finding your blog. 더 많은 페이지를 색인에, 당신은 누군가가 당신의 블로그를 찾기가 더 많은 기회가있다. Most themes that I’ve seen don’t have any category page at all and just index.php is used to display category content. 대부분의 테마는 내가 전혀 모르는 어떤 카테고리 페이지가 index.php 봤습니다 카테고리의 콘텐츠를 표시하는 데 사용됩니다. This is ok as a category.php file would be used for every single category you have added content too. 이것은 당신이 너무 category.php 파일로 콘텐츠를 추가한 매일 확인을 위해 사용될 것이 카테고리입니다. If you want “original content” on each and every category page then you will need to create a template file for each and every catetgory you have created (I hope you haven’t gone wild). 만약 당신이 ""당신은 매일 각 catetgory 위해 만든 템플릿 파일을 만들어야합니다마다 다음 카테고리 페이지 (내가 사라하지 않은 야생의 희망에) 원본 콘텐츠 싶어요.

If your Wordpress dashboard go to “Manage->Categories”. Wordpress 경우 대시보드에 "관리 -> 범주"로 이동합니다. If you put your mouse over any category name (without clicking), in the bottom of your web browser in the status bar will appear the “category ID”. 카테고리 이름이 있으면 언제든지 (클릭)도없이, 귀하의 웹 브라우저의 하단 상태 표시줄에서 "이 나타납니다 카테고리 마우스를 넣어 신분증".

카테고리 WordPress의 예를 신분증

If your theme doesn’t have a “category.php” file (if it does - use it), open up your “index.php” file and “save as “category-18.php” (using your category ID of course), and create one category template file for each category you have in your blog. 귀하의 테마는 "파일"category.php도하지 못하는 경우가 (-), 귀하는 "index.php 열어"파일 및 사용 ""카테고리 - 18.php "로 저장 (귀하의 카테고리를 사용하는 과정의 ID를 ), 그리고 여러분의 블로그에 하나의 범주가 각 카테고리에 대한 템플릿 파일을 만듭니다. In each file add a few paragraphs of original content to each category file, and then when search engines come around to index you - you’ll have some original content on each and every category page!! 각 파일에 각 카테고리에, 그리고 검색 엔진 주위를 색인 할 때 - 당신은 각 카테고리 페이지에 모든 원본 콘텐츠를 가지고 해야지 일부 파일은 원본 콘텐츠의 몇 단락을 추가!!

Also, see this as an opportunity (not work). 또한, 기회 (직장)이 참조하십시오. Why? 왜? Because it’s an opportunity to make more money. 때문에 더 많은 돈을 벌 수있는 기회입니다. You can place different relevant targeted niche ads on each and every category page! 당신은 매일 다른 관련 카테고리 페이지에 타겟 광고를 게재할 수있습니다 틈새! Look at home many additional monetization opportunities you just created! 집에서 방금 만든 많은 추가적인 수익 창출의 기회를 봐!

Regarding Category Templates, you should also read 카테고리 템플릿에 대해서도 읽어야한다 Wordpress Theme Hack: Show Category Images WordPress의 테마를 해킹 : 보여 카테고리 이미지 , and , 그리고 Wordpress Hack: 9 Things You can do with Categories WordPress의 해킹 : 9 가지 카테고리와 함께 할 수있는 .

Wordpress Tag Template Pages WordPress의 태그 템플릿 페이지

Wordpress Template Tag pages work the exact same way as category template pages, with the exception that they use the “slug” (tag keywords) instead of the ID (I don’t know why category template can’t do this too!). 워드 템플릿 태그 페이지는 똑같은 방식으로 작업을 카테고리로 예외들은 "(태그 키워드) 대신의 ID는"민달팽이 사용하는 템플릿 페이지 (내가 왜 이것도 할 수 없어 템플릿 카테고리 몰라!). So, if you tagged a post “wordpress hacks”, then your tag template file would be “tag-wordpress-hacks.php”. 그래서, 만약 네가 그러면 태그 "태그 - 워드 - hacks.php가 될 것"템플릿 파일 게시물 "WordPress의 해킹"태그가. In the organization of a blog, categories should be very broad, and tags should be descriptive. 블로그의 조직에서는 매우 카테고리, 태그를 잘 나타내는 이름이어야 확장되어야합니다. A good example of a category would be “news”, or “code”. 카테고리의 좋은 예로 "뉴스", 또는 "코드"가 될 것이다. Tags could be “9-11″ or “css web design”. 태그 "9-11"또는 될 수있다 "CSS는 웹 디자인". That’s why optimally you should have maybe a dozen or two categories, but you might have hundreds (even thousands!) or tags. 그래서 당신은 아마도어야 최적의 한 다스 또는 두 가지 종류가 있지만 수백 (심지어 수천!)이나 태그를했을 수도있습니다. Since I’ve had the same categories since this blog started, but I add new tags all the time - I probably won’t create a custom tag template page for every tag I have. 이후 동일 업종이 블로그를 시작했고 이후했지만, 새로운 태그가 모든 시간 - 아마도 나는 내가 가진 모든 사용자 정의 태그 태그에 대한 템플릿을 생성하지 않을 페이지를 추가합니다. I WILL, however, create one for all the tags I feel are most-used, most-important, and most-monetizable! 그러나 나는 대부분의 위치 -, 가장 - 중요한, 그리고 가장 - monetizable 사용하는 하나의 내가 느끼는 모든 태그를 만들 것이다!

You should also read 당신도 읽어야한다 Wordpress Hack #15: Hacking Wordpress Tags WordPress의 해킹 # 15 : 해킹 Wordpress 태그 .

Wordpress Author Template Pages WordPress의 저자 템플릿 페이지

This is a template page I seldom see used, because most blogs have one author. 이 때문에 저자는 대부분의 블로그를 하나 가지고, 내가 거의 사용 페이지 참조 템플릿입니다. Many blogs though have multiple contributors and authors - and each post can have an “authored by” link which takes them to the author page. 대부분의 블로그는 비록 여러 참여자 및 저자가 - 각 게시물이있습니다 ""링크로있는 저자는 페이지 작성 이끌죠. If “author.php” doesn’t exist, index.php will be used by default. 만약 "author.php"존재하지 않는, index.php 기본적으로 사용됩니다.

The author.php page can list pages written by that author, all authors, it can list the authors - and be customize any number of ways. 이 author.php 페이지, 모든 저자, 저자 나열할 수있습니다 - 페이지는 작성자가 작성한 목록을 수 있고 다른 방법으로도 얼마든지 사용자 정의할 수있습니다. As I said, most themes don’t have this - but if you want a blog with multiple authors you probably want to create a custom author page. 말했듯이, 대부분의 테마는이가 없어 -하지만 만약 당신이 아마 맞춤형 페이지를 만들려고 여러 작가와 작가의 블로그 싶어요. For more information on what’s possible read the 무엇을 읽을 가능성에 대한 자세한 내용은 Wordpress Codex page on Author Templates. 저자 템플릿에 Wordpress Codex 국제 페이지를 참조하십시오.

Wordpress Single Post Page Templates WordPress의 단일 게시물 페이지 템플릿

When you write a post in Wordpress, it’s gets listed on your home (blog) page, your archive page, and the appropriate category and tag pages. Wordpress에 게시물을 쓸 때, 귀하의 가정에 (), 그리고 적절한 카테고리와 아카이브 페이지에 태그를 페이지에 귀하의 블로그에 나열된 당하지. But is also has it’s own (full) page, which is what we call the “single.php” or single post page. 그러나 또한 ()는 우리가 "single.php"또는 단일 게시물 페이지 부르는 거지 페이지, 전체 자체가있다. Nearly every theme has a single.php file, but if it doesn’t then (of course) the single post is displayed using the default index.php theme file. 거의 모든 테마,하지만 single.php 파일이 아니라면 다음 (물론) 기본 index.php 테마 파일을 사용하여 하나의 게시물에 표시됩니다 않습니다.

If your theme doesn’t have a “single.php” create one (based on index.php), if it does - consider customizing it. 귀하의 테마는 "single.php"하나를 만들 필요하지 않는 경우 (index.php), 만약 그게 - 그것을 기반으로 커스 터 마이징을 고려했다. If you use Adsense I think that the single post is a great place to add a 336×280 block just before your content. 만약 내가 그 단일 게시물 336 × 280 블록을 추가하는 훌륭한 장소라고 생각하기 전에 귀하의 콘텐츠를 그냥 애드 센스를 사용합니다.

Wordpress “Page” Templates WordPress의 "페이지"템플릿

I think that a Wordpress “Page” is the most mis-understood thing in the entire blogging software. 내 생각에 그 전체가 블로깅 소프트웨어에 Wordpress "페이지"가장 잘못입니다 - 이해가 가지. When you go to “Write” in the Wordpress dashboard you have options to write a “Post” or a “Page”. 글을 쓸 때는 ""쓰기 옵션을 가지고 Wordpress 대시보드에 가서는 "포스트"또는 "페이지". The choice to write one or the other is a choice basically to use the “blogging paradigm” or not. 선택은 하나 이상의 다른 쓰기는 기본적으로 "또는"블로그를 사용하는 패러다임이 아니라 선택의 여지가있다. By writing a “post” you are writing not only a “single” page post, but it also will be listed on the home (blog) page, and archive page, as well as category and post pages. 뿐만 아니라 "하나의"페이지에 게시물을 작성할 수있습니다 "게시물"쓰기,하지만 그것도 홈에 나열됩니다 (), 그리고 아카이브 페이지뿐만 아니라 페이지의 카테고리와 페이지를 블로그에 게시했다. The choice to author a “page” is like an “about page” - it’s static in the sense that it won’t be listed on blog type pages. 작성자에게 선택 "페이지의"페이지 ""에 대해 같다 - 감각 그런 유형의 정적 페이지를 블로그에 표시되지 않을 것이다. It will only be listed in the navigation of your theme or a list of “pages” in the sidebar. 그것만이 당신의 테마 또는 사이드바에 "페이지"의 목록의 탐색에 나열됩니다.

Pages can be anything, an about page, an advertise with us page, a contact page, or even a series page where you provide descriptions of posts and link to them on one central location. 페이지 페이지에 대한 우리와 함께, 또는 심지어는 일련의 페이지를 어디에 대한 설명을 제공하는 게시물의 연락처 페이지를 홍보하고 그들에게 하나의 중앙 위치에 링크를 아무것도 될 수있습니다. Pages are a great way to organize content in your blog, and the more you create - the more you’ll find the need to create custom layouts. 페이지를 블로그에 콘텐츠를 정리하는 가장 좋은 방법, 그리고 만들 더있다 - 더 필요 사용자 정의 레이아웃을 만들 찾을 거다. On this blog I created a page template with a custom sidebar for my 이 블로그에서 사이드바와 함께 한 페이지에 대한 사용자 지정 템플릿을 만들어 내 forum 포럼 . I also created a special one for my 또한위한 특별 한가 만들어 내 archived posts sitemap 보관된 게시물 사이트맵 , and , 그리고 testimonials 평가 . On one of my other blogs I created one with no sidebar at all for my 내 다른 블로그 중 하나에서 하나를위한 전혀 사이드바와 함께 만들어 내 find cheapest gas 싼 가스를 찾을 수 page. 페이지를 참조하십시오.

If you want to create a custom template theme file for that you can assign to any “page” that you write in Wordpress all you need to do is open your index.php file and “save as” whatever name you want (like sitemap-template.php or whatever). 만약 당신이 Wordpress 당신이 할 일을하여 index.php 파일을 열 수있다 ""무엇 (사이트맵처럼 - 원하는 이름으로 저장할 필요에 쓰기는 "페이지"에 할당할 수있는 테마 파일에 대한 사용자 지정 서식 파일을 만들려면 또는 무엇을 template.php). I try to name all mine something-template.php, just to keep them straight. 나는 내 전부 뭔가 - 이름을 template.php, 곧바로 그들을 계속하려고합니다.

In the top of that page you are going to need to add the following code (copy and paste) so it gets identified as a template in Wordpress: 당신은 다음 코드를 (복사 및 붙여넣기) 그것은 Wordpress에서 템플릿으로 식별하게 만든다 : 추가할 필요로 가는데 그 페이지의 맨 위에 있음

 <?php /* Template Name: My Template Page */ ?> 

Change “My Template Page” to whatever you’re naming your template, and then customize the page by creating a 변경 "내 템플릿 페이지에서"귀하의 템플릿, 그리고 무엇 명명 걸 그때 작성하여 페이지를 사용자 정의할 master archive index template 마스터 아카이브 색인 템플릿 , create a 한 만들려면 custom 404 error page template 사용자 지정 404 오류 페이지 템플릿 , or even , 아니면 심지어는 create templates with alternate sidebar layouts 대체 레이아웃 템플릿을 만들 사이드바 .

In your Wordpress dashboard to assign a template, just scroll down past the post text box and under “template”, just find your custom template in the drop down and choose it to apply that particular template to your page and “save”! 귀하의 Wordpress Dashboard에서, 단지 텍스트 상자 아래 게시물 과거와 "아래로 스크롤 템플릿"템플릿, 그냥 드롭 다운 메뉴에서 사용자 지정 템플릿과 그것 특별히 귀하의 페이지 템플릿 "저장"을 적용하도록 선택할 찾을 할당합니다!

The possibilities are endles… endles 가능성 ...

Creating a Custom Wordpress Search Page 사용자 정의 WordPress의 검색 페이지 만들기

In Wordpress when someone searches your content, “search.php” is used for the results. 워드에서 누군가가, "search.php"결과에 대한 귀하의 콘텐츠를 검색하는 데 사용됩니다. You could create a 당신이 만들 어질 수 있었 을까 custom search results template 맞춤 검색 결과 템플릿 so people find what they need each and every time. 그래서 사람들이 원하는 것을 찾는 때마다 각과. You could also monetize this page with an ad if you wished, or just provide links to your top content on top of the search results. 또한 광고를하는 경우, 또는 빌었 그냥 검색 결과의 상단에 가기 콘텐츠로 연결되는 링크를 제공하여이 페이지를 통해 수익을 창출할 수있습니다. If your theme doesn’t have a search.php, just create one based on index.php. 귀하의 테마는, 그냥 하나의 index.php를 기반으로 만들 search.php가없습니다.

Creating a Custom 404 Error Page in Wordpress 워드에서 사용자 지정 404 오류 페이지 만들기

I think that one of the most important things is not just what people see when they find your content, it’s what they see what they don’t find anything at all. 그 중에서 가장 중요한 것은 단지 어떤 사람들이 귀하의 콘텐츠를 찾아 볼 수가있다, 그것들은 모두 무엇을 찾지 못한다면 아무것도 볼 것 같아요. If someone gets a “404 page not found” error on your Wordpress blog, Wordpress looks for the “404.php” file first, and if you don’t have one it uses index.php by default. index.php를 사용하면 기본적으로 하나도 없어 누군가가 "404 페이지를 맡으 Wordpress 블로그에"오류가 발견되지, Wordpress "404.php"첫 번째 파일에 대한, 그리고 보인다. If you don’t have one, create it based on your index.php file - and then customize it right away! 만약 당신이 당신의 index.php 파일을 기반으로 만들 하나도 없어 - 그리고 바로 사용자 정의! Most themes just have some bogus default message like “error - not found”. 대부분의 테마는 단지 "와 같은 일부 가짜 기본 메시지"오류 - 찾을 수없습니다.

The first thing you want ot do is to erase that and put a nicer message. 당신 자식을 원하지 처음 한 일은 그 멋진 메시지를 넣어 지워하는 것입니다. Write a paragraph and include some links to your top areas AND your contact form in case they want to get ahold of you. 단락 쓰기 및 상위 지역 일부 링크와 귀하의 문의 양식을 포함 사건에 그들이 당신에게 연락을 싶어요. Next, install a plugin that gives them automatically the best results it can - for details read 다음, 자동 수있는 최선의 결과 - 세부 사항들을 제공하는 플러그인을 설치 읽고 Wordpress Hack #4: Create a Custom Error 404 Page WordPress의 해킹 # 4 : 만들기 사용자 지정 404 오류 페이지 .

Wrapping it Up… 그것을 감싸 ...

No matter where you got your Wordpress theme, and whether it was basic or a Premium one you paid top dollar for - it CAN and SHOULD be customized to it’s fullest possible extent. 어디에 있든, 그리고 기본이었다 여부 또는 귀하 Wordpress 테마를 가지고 당신을위한 프리미엄 유료 가기 달러 - CAN 및 그것의 가능한 범위 내에서 최대한 사용자 정의가 될 겁니다. A theme designer often is worried about the web design and layout aspect ONLY with no consideration for organization of your blog, it’s content, SEO and search indexing capabilities - let alone error messages or search pages. 테마 디자이너가 종종 블로그의 조직에 대한 배려와 함께 웹 디자인과 레이아웃 측면에 불과, 검색 엔진 최적화 및 검색 색인 생성 기능을 콘텐츠의 - 혼자 오류 메시지나 검색 페이지를 보자 걱정이다. Do your self (and your visitors) a favor and make sure that you have ALL areas of your Wordpress template hierarchy covered! 당신의 자아 (방문자) 부탁 말아요 당신이 Wordpress 계층 덮여 템플릿의 모든 영역이 있는지 확인!

I hope I didn’t give you too much work to do, but by the time you’re done with everything I just taught you you will have a much better understanding of how Wordpress and Wordpress Themes work. 내가 할 일이 너무 많아 당신이 허락하지 않았어,하지만 당신은 내가 당신들의 희망 훨씬 이해가 될 짓을 다 가르쳐 시간과 방법을 Wordpress Wordpress 테마 작품. When you’re done you might be interested in moving on an reading 때 당신은 독서에 관심을 가질만한 이사 끝났어요 How to Create Your Own Wordpress Theme 어떻게 자신의 WordPress의 테마를 만들


Tags: 태그 : , ,

2 Responses to “Wordpress Hack #18: Hacking Wordpress Template Files” 이 답변에 "Wordpress 해킹 # 18 : 해킹 Wordpress 템플릿 파일"

  1. Erika 에리카 Has the following to say... 다음 말하기를 ...

    All of the wordpress sites I’ve built - from scraaaaaaatch, at that - and I’ve never thought of creating an author.php page! 모두 제가 작성한 워드 프레스 사이트 중 - scraaaaaaatch에서, 저걸 - 그리고 난 author.php 페이지를 만들 생각은 안해 봤어요! Ugh! 헉! I had to write that one down. 그 하나는 아래를 작성했다. LOL.

    Erikas last blog post.. 지난 Erikas 블로그 게시물을 .. Miami Web Design 마이애미 웹 디자인

  2. Paul U 폴 유 Has the following to say... 다음 말하기를 ...

    Thanks for sharing! 공유 주셔서 감사합니다!

    I’ve been doing some tweaking on Blogger template before but I find i hard on Wordpress template. 템플릿은 Blogger를 일부 조정 해왔지만 난 Wordpress에 서식하기 전에 하드 찾으십시오.

    Paul Us last blog post.. 바울은 마지막으로 블로그 게시물에 관하여 .. Courage + money 용기 + 돈 = success [Digg] 성공 [디그]

Question or Comment?? 질문이나 코멘트?? Spill it Now... 안해주면 이제 ...

기쁨에 대한 의견 히에쓰!

We Reward Comments! 우리가 의견을 보상!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! 우리 dofollow 링크와 "CommentLuv"플러그인에서 모든 새 덧글 작성자 표시줄 아래에 귀하의 최신 블로그 게시물을 얻을! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! 매달 최고의 코멘트 사이드바 위젯에이 사이트의 모든 페이지의 URL을 다시 연결에 나열되어있습니다! We would like to reward you for becoming part of our community! 우리는 우리 공동체의 일부가 된 당신을 보상하고 싶습니다! Your comment is valuable not only to us, but also all the other readers of this blog! 귀하의 의견을 우리에게뿐 아니라이 블로그의 가치는 다른 모든 독자!


Click to add smilies to your post! 게시물에 웃음을 클릭하여 추가합니다! == []^ = (= ((= (|=) r에= | 8= 0=) ~= 00= (=;;=)]=;;;