Wp Affiliate Pro - The #1 Plugin For WordPress Blogs wp를 제휴사 프로 - # 1 플러그인 WordPress의 블로그
Powered by MaxBlogPress 문서 Powered by MaxBlogPress

WordPress의 해킹 # 19 : 해킹 태그 페이지 | JTPRATT의 블로깅 실수
JTPratt의 블로깅 실수





Home » Wordpress Hack #19: Hacking Tag Pages »Wordpress 해킹 # 19 : 해킹 태그 페이지



Posted in: 에 게시됨 :

블로그 - 설치 카테고리 이미지블로그 카테고리 이미지블로깅 - 실수 카테고리 이미지WordPress의 카테고리 이미지워드 - 현서야 카테고리 이미지
256 views 256 조회


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 unique Wordpress hack will allow you to index tag pages you create without having to create template files for each and every one. 이 독특한 Wordpress 당신이 매일을위한 템플릿 파일을 만들 필요없이 하나의 색인을 만들 수있는 태그 페이지를 해킹했다.

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

Back in 뒤쪽에 Wordpress Hack #15: Hacking Wordpress Tags WordPress의 해킹 # 15 : 해킹 Wordpress 태그 I described how to add “tag support” to your Wordpress theme files, and how to add a “tag cloud” like the one I use on this blog in the bottom of the left sidebar. 내가 얼마나 ""당신의 Wordpress 테마 파일에 태그를 지원을 추가하기 위해, 그리고 설명하는 방법을 "처럼"태그 클라우드를 추가로 하나를 사용하여 왼쪽 사이드바의 하단에이 블로그에있습니다. When you “tag” pages you are actually creating additional pages in your blog - that can get indexed by search engines. 때 "태그"페이지를 실제로 블로그에 추가 페이지를 만들 수있습니다 - 검색 엔진에 의해 색인을 얻을 수있습니다.

For example, let’s say that I create a new post about an iPod. 예를 들어, 내가 아이팟에 대한 새로운 게시물을 작성한다고 가정해 봅시다. I put the post in the “gadget” category, and tag it “iPod” and “mp3 player”. 난 "카테고리,"가제트에 게시물을 올리고 태그 "아이팟"과 "MP3 플레이어". Within the Wordpress paradigm many things happen… 여러 가지 일이 내에 Wordpress 패러다임 ...

  1. A new post page is created based on your single.php theme file using the post title as permalink 새 게시물 페이지 single.php 테마는 permalink로 게시물 제목을 사용하여 파일을 기반으로 만들어집니다
  2. The post is added to the top of your blog home (usually your index.php home, unless you changed it - like I did) 당신이 그것을 변경하지 않는 한 귀하의 블로그 게시물 집에 가기로 (일반적으로 귀하의 index.php 집에 추가됩니다 - 마치 내가)했던
  3. The post is added to the appropriate archive pages for day, month, year, etc. 게시물을 하루에 대한 적절한 아카이브 페이지를 달, 연도 등 추가됩니다
  4. The post is added to all “category” pages you assigned it to 게시물을 모두 "카테고리에"페이지를 당신에게 할당된 추가됩니다
  5. The post is added to all “tag” pages you added it to 게시물을 모두 "태그로 당신에게 추가"페이지가 추가됩니다

If you read 읽으면 Wordpress Hack #18: Wordpress Template Files WordPress의 해킹 # 18 : Wordpress 템플릿 파일 , you already know that you can create custom “tag” and “category” pages, so when the old google crawler comes a-knockin’ it will find original content and not penalize your blog in search rankings. 당신은 이미 당신과 "카테고리"페이지, 그렇게되면 기존 Google 크롤 러가 온다 "태그"사용자 지정을 만들 수있습니다 알고 - knockin '검색 순위에 귀하의 블로그에 불이익을 원본 콘텐츠를 찾을 수없습니다. The problem normally is - if you’re a prolific blogger, you (like many of us) may have a few dozen categories, and hundreds (if not thousands) of tag pages. 문제는 정상적입니다 - 만약 당신이 다작의 블로거, 당신은 (우리의 많은거야), 몇 통 범주가있습니다, 그리고 수백 (만약에 태그를 페이지의 수천 안).

When you categorize a post, you can find it within your blog at: 게시물을 카테고리로 분류할 때, 당신의 블로그 사이에서 그것을 확인할 수있습니다 :
www.site.com/category/cat-name www.site.com / 카테고리 / 고양이 - 이름

When you tag a post you can find it within your blog at: 때 당신의 블로그 사이에서 그것을 찾아낼 수있는 게시물 태그 :
www.site.com/tag/tag-name www.site.com / 태그 / 태그 - 이름

To create a custom page for any category or tag page, all you have to do is use your index.php or single.php to create a new Wordpress theme file. 모든 카테고리 또는 태그 페이지, 여러분 모두 새 Wordpress 테마 파일을 만들거나 귀하의 index.php single.php 사용해야하는 사용자를위한 페이지를 작성하십시오. Open either index.php or single.php in a text editor and “save as” either: 텍스트 편집기에서 index.php하거나 또는 single.php 열기 "로"역시 할인 금액 :

category-id.php (for category pages) 카테고리 - (카테고리 페이지에 대한) id.php
or 또는
tag-slug.php (for tag pages) 태그 - (태그를 페이지에 대한) slug.php

This means if my “gadget” category was “17″ then my theme file for it would be “category-18.php”. 이 경우 "가제트"카테고리 "17"그렇다면 내 테마는 "이 될 것이라고 18.php 카테고리 - 파일"을 의미합니다. If my tag was “mp3 player”, then my theme file for it would be “tag-mp3-player.php”. 만약 내 태그는 "MP3 플레이어"를 위해 "태그 -있는 mp3 - player.php"가 될 것이 내 테마 파일됐다. View my 내보기 Wordpress Template Files 워드 템플릿 파일 hack page for pics and a better description. 더 나은 사진에 대한 설명 페이지를 해킹했다.

So - What “I” did was create category theme files for every category I had. 그래서 - 무슨 종류를 위해 내가 가진 모든 카테고리의 테마 파일을 만들려면 "나"않았다. THEN, I created a single “tag.php” file that would display for every tag page I have. 그렇다면, 제가 단일 "tag.php"내가 가진 모든 태그를 페이지에 표시할 파일을 만들었습니다. What I didn’t mention up until now was that if you create a “category.php” and “tag.php” file and put them in your theme directory that these will be used for ANY category or tag pages that don’t already have one for that slug or ID. 지금까지하면 "와"tag.php "파일"category.php를 만들 어서 여러분의 테마 디렉토리에서 이러한 모든 카테고리 또는 이미 않아 태그를 페이지에 사용됩니다 넣어 무슨 일이 언급하지 않았다 총알이나 ID를 하나 가지고있다.

Every blog is of course a different topic (or niche), but this is what I did for tag pages on one blog I own. 모든 블로그 물론 다른 주제 (혹은 틈새)이다, 그러나 이것은 내가 태그를 페이지에 대한 자신의 블로그에 하나의 내가 무슨 짓을했는지이다. I used the tag title to create a different description lead-in sentence to get each tag page listed in the search engines. 난 다른 설명이 선두를 만드는 - 문장에있는 각 태그는 페이지가 검색 엔진에 등록되게하기 위해 사용되는 태그는 제목. Right before “the loop” I placed this bit of code to do that: 바로 전에 "루프"나도 할 코드의이 비트 위 :

 <p><?php single_tag_title('This page is about '); ?>! My blog is about geeky tech stuff, technology, Linux, gadgets, web tools, and more! <?php single_tag_title('If you like '); ?>, the posts below should be right up your alley!! 

That code gets the “tag_title” and uses it like this (for the example “mp3 player”): 그 코드는 ""tag_title 오면처럼 사용하는 예를 들면, "MP3 플레이어"이 (위해) :

“This page is about MP3 Players! "이 페이지에 대해 MP3 플레이어입니다! My blog is about geeky tech stuff, technology, Linux, gadgets, web tools, and more! 내 블로그에 대한 기술적 재료, 기술, 리눅스, 가제트, 웹 툴, 그리고 더 많은 괴짜입니다! If you like MP3 Players, the posts below should be right up your alley!!” MP3 플레이어 같은 경우, 귀하의 골목 바로 아래에 있어야하는 게시물!! "

I did this a month ago on one of my blogs, and all the tag pages are indexing nicely! 내가 그랬어이 한 달 전에 내 블로그의에, 그리고 모든 태그 페이지를 멋지게 색인 생성됩니다! I’m sure you could hack this up even further - but this simple little solution fixed my tag page indexing problem quickly. 난 당신이 더욱 해킹할 수있을거야 -하지만이 단순하고 작은 솔루션을 신속하게 문제가 해결될 내 태그 페이지의 색인을 생성합니다.


Tags: 태그 : , , , ,

11 Responses to “Wordpress Hack #19: Hacking Tag Pages” 11 응답을 "Wordpress 해킹 # 19 : 해킹 태그 페이지"

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

    Yikes… I think you might’ve missed a code tag in your post? 이궁 ... 나는 당신의 포스트에있는 코드에 태그를보고있을 것 같아요?

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

  2. admin 관리자 Has the following to say... 다음 말하기를 ...

    fixed now - thanks! 지금은 고정 - 고마워! =)]

  3. Anthonyq Anthonyq Has the following to say... 다음 말하기를 ...

    Another great tip which i’m implementing right now! 지금 당장은 구현있어 또 다른 위대한 팁!

    Question thou : how do you trunticate your listings in the Tag Page order to avoid duplicate content? 질문의 죄과 : 어떻게 중복을 피하기 위해 콘텐츠에 태그를 페이지 순서대로 목록을 trunticate합니까?

  4. Mark - The Niche Store Builder 마크 - 틈새 가게 빌더 Has the following to say... 다음 말하기를 ...

    Hey man - Glad to see your back!! 이봐 - 다시 보니 다행!! Either I missed a bunch of posts, or you took a vacation! 역시 난 게시물의 무리,보고 싶었거나 휴가를 가져 갔어!

    Mark 마크

    Mark - The Niche Store Builders last blog post.. 마크 - 마지막으로 블로그 게시물을 .. 틈새 쇼핑몰 빌더스 Creating your Own little WordPress Playground 당신만의 작은 WordPress의 운동장 만들기

  5. jj-momscashblog 제이 - momscashblog Has the following to say... 다음 말하기를 ...

    Hi JT, First time here and I’ve enjoyed your posts, full of lots of info. 안녕 JT는, 여기 처음와 나는, 정보의 많고의 전체 게시물을 즐겁게했습니다. will have to come back and read a couple of others that I thought looked interesting. 돌아올을 읽고 다른 사람의 몇 가지 흥미로운 모습은 내가 생각하는 것입니다. thanks so much . 정말 고마워요. I also wanted to let you know your Entrecard will be on my blog tomorrow, so many thanks for that. 당신이 내 블로그 Entrecard 알고도 내일이 될 수 있도록, 그 덕분에 너무 많은 싶었어요. =

  6. admin 관리자 Has the following to say... 다음 말하기를 ...

    @jj-momscashblog - thanks for the kind words, glad to have you here! @ 제이 - momscashblog - 어떤 단어에 대한 감사합니다, 여기에 당신이있어서 다행! =)]

  7. admin 관리자 Has the following to say... 다음 말하기를 ...

    @Mark - thanks for the comment! @ 마크 - 코멘트 주셔서 감사합니다! No - I didn’t post at all last week and only once the week before (too busy!). 아니 - 내가 지난 주에 모두에서 단 한번 일주일 전에 게시되지 않은 (너무 바빠!).

  8. admin 관리자 Has the following to say... 다음 말하기를 ...

    @Anthonyq - I don’t truncate the listings on my tag page (other than maybe excerpt) to avoid duplicate content, it’s just not any issue (in google) anymore. @ Anthonyq - 내 태그를 페이지에 목록을 잘라야하지 않습니다 (아마도 발췌)보다 중복 콘텐츠를 피하기 위해 다른, 전혀 문제가 구글 () 이상에 그냥 아니에요.

  9. Anthonyq Anthonyq Has the following to say... 다음 말하기를 ...

    Ah ok. 아, 괜찮아. I was looking on your blog here, i noticed that the listings were summaries. 내가 여기에 귀하의 블로그를 찾고 있었다면, 그 목록을 요약했다 나타났습니다. Wondering how you do that? 궁금 어떻게합니까?

  10. Dennis Edell 데니스 Edell Has the following to say... 다음 말하기를 ...

    Love these posts. 사랑이 게시물을했다. I’m saving them all for when I may be confident enough to hack without destroying. 난 모두를 파괴하지 않고도 해킹을 할 때 충분히 사람들을 구원에 대한 자신감이있을 수있습니다. :-)

    Dennis Edells last blog post.. 데니스 Edells 마지막 블로그 게시물을 .. Grab Your Offline Marketing Tools Here Too! 여기도 오프라인 마케팅 도구를 잡아!

  11. admin 관리자 Has the following to say... 다음 말하기를 ...

    @Dennis - I would read @ 데니스 - 난 읽을 것 showing only a post excerpt in Wordpress 워드에서만 게시물을 발췌 게재 .

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= (=;;=)]=;;;