Unlimited $1.99 domain names - We use goDaddy Ilimitado $ 1,99 nomes de domínio - Usamos GoDaddy
Powered by MaxBlogPress Powered by MaxBlogPress

Wordpress Hack # 19: Hacking Tag Páginas | JTPRATT's Blogar Mistakes
JTPratt's blogar erros





Home Início » Wordpress Hack #19: Hacking Tag Pages »Wordpress Hack # 19: Hacking Tag Páginas



Posted in: Publicado em:

blog-setup categoria imagemblogging categoria imagemblogando-categoria erros imagemwordpress categoria imagemwordpress-seo categoria imagem
254 views 254 visualizações


Please note: This page was originally written in English. Atenção: Esta página foi originalmente escrito em Inglês.

The original post can be viewed O post original pode ser visualizada here aqui .

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. Esta única piratear Wordpress permitirá que você índice tag páginas que você criar, sem ter que criar um modelo arquivos para todos e cada um.

This post is part of Este post é parte da 30 Wordpress hacks in 30 days 30 Wordpress hacks em 30 dias .

Back in Voltar no Wordpress Hack #15: Hacking Wordpress Tags Wordpress Hack # 15: Hacking Wordpress Tags 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. Eu descrito como adicionar "tag apoio" para o seu tema Wordpress arquivos, e como adicionar uma "tag cloud" como a que eu uso neste blog, no fundo da barra lateral esquerda. When you “tag” pages you are actually creating additional pages in your blog - that can get indexed by search engines. Quando você "tag" são páginas que você realmente criar páginas adicionais em seu blog - que pode chegar indexado por motores de busca.

For example, let’s say that I create a new post about an iPod. Por exemplo, digamos que eu crie uma nova postagem sobre um iPod. I put the post in the “gadget” category, and tag it “iPod” and “mp3 player”. Eu coloquei o post no "gadget" da categoria, e etiquetá-lo "iPod" e "mp3 player". Within the Wordpress paradigm many things happen… Dentro do paradigma Wordpress muitas coisas acontecem ...

  1. A new post page is created based on your single.php theme file using the post title as permalink Um novo posto página é criada com base em seu arquivo usando o tema single.php título da postagem como 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) A postagem é adicionada ao topo de seu blog casa (geralmente index.php sua casa, a não ser que você mudou isso - como eu fiz)
  3. The post is added to the appropriate archive pages for day, month, year, etc. A postagem é adicionada ao arquivo páginas apropriadas para o dia, mês, ano, etc
  4. The post is added to all “category” pages you assigned it to A postagem é adicionada a todas as "categorias" páginas que você atribuiu a ela
  5. The post is added to all “tag” pages you added it to O post é adicionado para todos "tag" páginas que você adicionou à

If you read Se você ler Wordpress Hack #18: Wordpress Template Files Wordpress Hack # 18: Wordpress Template Files , 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. , Você já sabe que você pode criar personalizado "tag" e "categoria" páginas, por isso, quando o antigo indexador do google-vem uma knockin 'irá encontrar conteúdo original e não penalizar o blog em busca rankings. 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. O problema normalmente é - se você é um blogueiro prolífico, você (como muitos de nós) pode ter algumas dezenas de categorias, e centenas (se não mesmo milhares) de tag páginas.

When you categorize a post, you can find it within your blog at: Quando você categorizar um post, você pode encontrá-la dentro em seu blog:
www.site.com/category/cat-name www.site.com / categoria / nome-do-gato

When you tag a post you can find it within your blog at: Quando você marcar uma postagem que você pode encontrá-la dentro em seu blog:
www.site.com/tag/tag-name www.site.com / tag / tag-name

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. Para criar uma página personalizada para qualquer categoria ou etiqueta página, tudo que você tem que fazer é usar seu index.php ou single.php para criar um novo Wordpress theme. Open either index.php or single.php in a text editor and “save as” either: Abra quer single.php index.php ou em um editor de texto e "salvar como" ou:

category-id.php (for category pages) id.php-categoria (para a categoria páginas)
or ou
tag-slug.php (for tag pages) Tag-slug.php (para páginas tag)

This means if my “gadget” category was “17″ then my theme file for it would be “category-18.php”. Isto significa que se o meu "gadget" da categoria foi "17" e depois o meu ficheiro para o tema seria "categoria-18.php". If my tag was “mp3 player”, then my theme file for it would be “tag-mp3-player.php”. Se a minha tag era "mp3 player", então meu arquivo para o tema seria "tag-mp3-player.php". View my Ver o meu Wordpress Template Files Wordpress modelo arquivos hack page for pics and a better description. hack página de fotos e uma melhor descrição.

So - What “I” did was create category theme files for every category I had. Então - O que eu fiz foi criar arquivos para cada categoria temática categoria que eu tinha. THEN, I created a single “tag.php” file that would display for every tag page I have. Então, eu criei um único "tag.php" arquivo que teria de exibição para cada página tenho etiqueta. 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. O que não falei até agora foi a de que se você criar um "category.php" e "tag.php" arquivo e coloque-os em seu diretório tema que estes serão utilizados para qualquer categoria ou etiqueta páginas que não já para que tenham uma lesma ou 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. Cada blog é, naturalmente, um tema diferente (ou nicho), mas isto é o que eu fiz para codificar páginas em um blog eu próprio. I used the tag title to create a different description lead-in sentence to get each tag page listed in the search engines. Eu usei a tag título de criar uma descrição diferente conduzir-nos dar a cada frase tag listada na página motores de busca. Right before “the loop” I placed this bit of code to do that: Direita antes de "loop" depositei este pedaço de código para fazer isso:

 <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”): Que recebe o código "tag_title" e usa-lo desta forma (por exemplo o "mp3 player"):

“This page is about MP3 Players! "Esta página é sobre MP3 Players! My blog is about geeky tech stuff, technology, Linux, gadgets, web tools, and more! Meu blog é sobre coisas Geeky tech, tecnologia, Linux, gadgets, ferramentas web, e muito mais! If you like MP3 Players, the posts below should be right up your alley!!” Se você gosta de MP3 Players, os cargos a seguir deve ser o seu direito beco!! "

I did this a month ago on one of my blogs, and all the tag pages are indexing nicely! Eu fiz isso há um mês em um dos meus blogs, e todas as páginas estão indexando tag agradavelmente! I’m sure you could hack this up even further - but this simple little solution fixed my tag page indexing problem quickly. Eu tenho certeza que você poderia piratear deste up ainda mais -, mas esta solução simples pouco a minha etiqueta fixada página indexação problema rapidamente.


Tags: , , , ,

11 Responses to “Wordpress Hack #19: Hacking Tag Pages” 11 Responses to "Wordpress Hack # 19: Hacking Tag Pages"

  1. Erika Erika Has the following to say... Tem o seguinte a dizer ...

    Yikes… I think you might’ve missed a code tag in your post? Caramba ... Acho que você poderia menstruei um código identificador em seu posto?

    Erikas last blog post.. Erikas última postagem no blog .. Miami Web Design Miami Web Design

  2. admin admin Has the following to say... Tem o seguinte a dizer ...

    fixed now - thanks! fixo agora - muito obrigado! =)]

  3. Anthonyq Anthonyq Has the following to say... Tem o seguinte a dizer ...

    Another great tip which i’m implementing right now! Outra grande dica que eu estou execução agora mesmo!

    Question thou : how do you trunticate your listings in the Tag Page order to avoid duplicate content? Tu pergunta: como é que você trunticate suas listagens na Página Tag fim de evitar a duplicação conteúdo?

  4. Mark - The Niche Store Builder Mark - O nicho Store Builder Has the following to say... Tem o seguinte a dizer ...

    Hey man - Glad to see your back!! Ei cara - Fico feliz em ver a sua volta! Either I missed a bunch of posts, or you took a vacation! Ou eu perdi um monte de lugares, ou você tirou umas férias!

    Mark Marcar

    Mark - The Niche Store Builders last blog post.. Mark - A Niche Store Builders última postagem no blog .. Creating your Own little WordPress Playground Criar o seu próprio pequeno WordPress Playground

  5. jj-momscashblog jj-momscashblog Has the following to say... Tem o seguinte a dizer ...

    Hi JT, First time here and I’ve enjoyed your posts, full of lots of info. Oi JT, Primeira vez aqui e Adorei suas postagens, cheio de muita informação. will have to come back and read a couple of others that I thought looked interesting. terá de voltar e ler um par de outras que eu achei interessante olhou. thanks so much . agradecimentos muito. I also wanted to let you know your Entrecard will be on my blog tomorrow, so many thanks for that. Eu também queria que você saiba o seu Entrecard será amanhã no meu blog, então muito obrigado por isso. =

  6. admin admin Has the following to say... Tem o seguinte a dizer ...

    @jj-momscashblog - thanks for the kind words, glad to have you here! @ jj-momscashblog - agradecimentos pelas amáveis palavras, feliz por ter você aqui! =)]

  7. admin admin Has the following to say... Tem o seguinte a dizer ...

    @Mark - thanks for the comment! @ Mark - agradecimento pelo comentário! No - I didn’t post at all last week and only once the week before (too busy!). Não - Eu não via postal a todos os semana passada e apenas uma vez na semana anterior (muito ocupada!).

  8. admin admin Has the following to say... Tem o seguinte a dizer ...

    @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 - Eu não truncar as listagens na minha página etiqueta (com excepção talvez excerto) para evitar conteúdo duplicado, é apenas não causa qualquer (no google) anymore.

  9. Anthonyq Anthonyq Has the following to say... Tem o seguinte a dizer ...

    Ah ok. Ah ok. I was looking on your blog here, i noticed that the listings were summaries. Eu estava olhando aqui no blog, eu notei que as listas eram resumos. Wondering how you do that? Quer saber como fazer isso?

  10. Dennis Edell Dennis Edell Has the following to say... Tem o seguinte a dizer ...

    Love these posts. Adoro estes lugares. I’m saving them all for when I may be confident enough to hack without destroying. Estou salvando-os todos para quando posso estar confiante o suficiente tossidela sem a destruir. :-)

    Dennis Edells last blog post.. Dennis Edells última postagem no blog .. Grab Your Offline Marketing Tools Here Too! Agarre seu marketing offline ferramentas aqui também!

  11. admin admin Has the following to say... Tem o seguinte a dizer ...

    @Dennis - I would read @ Dennis - Gostaria de ler showing only a post excerpt in Wordpress mostrando apenas um post no trecho Wordpress .

Question or Comment?? Pergunta ou comentário?? Spill it Now... Agora ele derrame ...

Pulando de alegria ao longo comentários!

We Reward Comments! Nós recompensa comentários!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! Nós dofollow links, e pegar sua última postagem no blog como uma assinatura em cada nova observação do "CommentLuv" plugin! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! Commenters início de cada mês, são listadas em cada página deste site em um regressar às ligados sidebar widget seu URL! We would like to reward you for becoming part of our community! Gostaríamos de recompensar-te por fazer parte da nossa comunidade! Your comment is valuable not only to us, but also all the other readers of this blog! Seu comentário é válido não só para nós, mas também todos os outros leitores deste blog!


Click to add smilies to your post! Clique para adicionar ao seu post smilies! == []^ = (= ((= (|=) r= | 8= 0=) ~= 00= (=;;=)]=;;;