How To: Solve duplicate content in WordPress without plugins Como: Resolva conteúdo duplicado no WordPress sem plugins

ADVERTISEMENT ANUNCIE
To get our software and web/tips via email, sign up for Para obter o nosso software e web / sugestões via e-mail, inscreva-se daily email newsletter e-mail diário newsletter . .
Subscribe to RSS feed Assine o feed RSS or ou follow me siga-me on Twitter? no Twitter?

Duplicate content is a serious issue for all WordPress blogs, and most bloggers now employ different methods to show partial content. Duplicar conteúdo é uma questão muito séria para todos os blogs WordPress, ea maioria dos blogueiros já empregam métodos diferentes para mostrar conteúdo parcial. The only blogs with good search rankings which employ full posts, are usually authority blogs, which are labelled as safe and authoritative by Google's algorithm. A pesquisa só blogs com boa classificação que empregam pleno lugares, são geralmente autoridade blogs, que são rotulados como segura e autorizada pelo algoritmo do Google.

Plugins are a popular method to reduce duplicate content. Plugins são um método popular para reduzir conteúdo duplicado. However, plugins are not No entanto, não são plugins fully optimized totalmente otimizada , and consumes more server resources than the simple <?php the_excerpt() ?> tag. , E consome mais recursos do que a simples servidor <?php the_excerpt() ?> Tag. Moreover, excerpt tag can use the customized post summary that you may have written. Além disso, pode utilizar o trecho etiqueta personalizada pós resumo que você pode ter escrito.

In this short tutorial, you should have all the template files in one place. Neste breve tutorial, você deve ter todas as imagens em um modelo local. Once you have those files(probably downloaded from your server, or a local copy that you keep), follow these easy steps: Depois de ter esses arquivos (provavelmente descarregado a partir do seu servidor, ou uma cópia local que você mantenha), siga estas etapas simples:

ADVERTISEMENT ANUNCIE

  • Open up index.php , archive.php and search.php Abre index.php archive.php e search.php
  • In each of these files, search and find the code bit that contains <php the_content Em cada um desses arquivos, pesquisa e encontrar o código que contém bits <php the_content
  • Replace the entire tag – usually <?php the_content(__('Read the rest of this entry'));?> (may change depending on theme, but will be similar), with this tag: Substituir todo o tag - geralmente <? Php the_content (__(' Leia o resto desta entrada'));?> (pode mudar dependendo do tema, mas será similar), com esta tag:
    <?php the_excerpt();?> <? php the_excerpt ();?>
    Save the files. Salve os arquivos.
  • Open up index.php again, and save it as category.php (do not discard index.php ). Abre index.php novamente, e salve-o como category.php (sem descartar index.php

In the above steps, we have replaced the content tag with the excerpt tag so that only a short paragraph of the post is shown on pages other than the post page. Nas etapas anteriores, temos substituído o conteúdo com a etiqueta tag trechos de modo a que apenas um breve parágrafo do post é mostrado nas páginas que não sejam as páginas de postagem. Most themes lack a category.php , and its absence can allow full posts on category pages. A maioria dos temas falta um category.php e sua ausência pode permitir postagens completas sobre categoria páginas. By duplicating the index.php file(which has excerpt tag), that problem is also solved. Ao duplicar o index.php arquivo (que tem trechos tag), esse problema também está resolvido.

Open Mic Open Mic

How do you prevent duplicate content? Como você evitar conteúdo duplicado? Do you use this method, or any plugins? Você usa este método, ou qualquer plugins? If so, why do you prefer it over the excerpt tag?(I'd like to hear, as I am myself confused at which method to choose). Se assim for, por que você prefere que ao longo dos trechos tag? (Eu gostaria de ouvir, como eu próprio sou confundido com o método de escolha). Do tell me your views through comments. Não me diga sua opinião através de comentários.

To get our latest articles, Para obter os nossos últimos artigos, click here to sign up clique aqui para se inscrever for our free email newsletter or subscribe to para o nosso e-mail gratuito ou subscrever a newsletter RSS feed RSS feed

§ Comments § Comentários
  • Nirmal says: Nirmal diz:

    This is exactly what I have been doing. Isto é exactamente aquilo que tenho vindo a fazer. Use post excerpts. Use pós excertos.

  • Sumesh says: Sumesh diz:

    @Nirmal: Glad to hear your opinion. @ Nirmal: Fico feliz em ouvir a sua opinião. Could you be more specific as to why you prefer it? Poderia ser mais específico quanto ao motivo por que você prefere?

  • Karthik says: Karthik diz:

    Funny to run into this, I'd just blogged about something similar yesterday! Engraçado que este caia, eu só blog sobre algo semelhante ontem! And you did this 2 days earlier – guess it was a repeat for you to read my feed then! E você fez isso 2 dias antes - acho que foi uma repetição para você ler a minha alimentação, então!
    [Goes over to subscribe to your feed] [Avança mais para subscrever o feed]

    But I'd just like to make one clarification though – you won't need category.php if you have archive.php or index.php (err, you'd certainly have this one!). Mas eu só queria fazer um esclarecimento embora - você não precisará category.php se tiver archive.php ou index.php (errar, você pode certamente ter um presente!). What I meant was – if you are going to show excerpts on index.php, you can avoid having archive.php and category.php altogether – don't ask me why not, saves you 4kb on your webspace O que eu quis dizer foi - se você estiver indo para mostrar trechos em index.php, você pode evitar ter archive.php e category.php total - não me pergunte por que não, você economiza 4KB em seu web ;)

    The order is: A ordem é:
    1. 1. category-xx.php categoria-xx.php
    2. 2. category.php category.php
    3. 3. archive.php archive.php
    4. 4. index.php index.php

    If you'd like to make one particular category look unique, you can create a file with the category-CATEGORYNUMBER.php and that particular category would follow this template. Se você quiser fazer uma determinada categoria olhar único, você pode criar um arquivo com a categoria-CATEGORYNUMBER.php e que a categoria particular iria seguir este modelo. If it doesn't find this file, it will check if the next file in the hierarchy is there and so on. Se não encontrar esse arquivo, ele irá verificar se o próximo arquivo na hierarquia existe e assim por diante.

    Sorry about the overly long comment, I had to make myself clear! Desculpe pelo comentário excessivamente longo, eu tinha que fazer-me claro!

  • Sumesh says: Sumesh diz:

    @Karthik: No problem whatsoever about long comments – I love 'em! @ Karthik: Não há problema algum comentário sobre o tempo - Eu amo eles!
    Well, that thing about category-xx.php was something new to me, thanks. Bem, essa coisa de categoria-xx.php foi algo novo para mim, obrigado. And category no. E nenhuma categoria. means its ID, right? significa a sua ID, certo?
    As for 4kB webspace, lol Quanto a 4KB web, lol : D

  • Karthik says: Karthik diz:

    Yup, sorry, I should have mentioned ID there! Sim, desculpe, eu deveria ter mencionado ID lá!

  • Sumesh says: Sumesh diz:

    @Karthik: No problem, its understood. @ Karthik: Não tem problema, a sua entendido. Now that you've clarified it, readers will also understand. Agora que você já esclareceu que, os leitores também compreender.

  • Fred Schebesta says: Fred Schebesta diz:

    My recommendation would be to do this but also have unique content in the excerpt. Minha recomendação seria a de fazer isso, mas também tem conteúdo exclusivo no trecho.

    I have actually switched categories off entirely and have opted for pages instead. Eu, na verdade, ligado categorias totalmente desligado e optaram por páginas vez.

    (Note the blog above is not an example of this ;-D ) (Nota do blog acima não é um exemplo disto;-D)

  • § Leave a Reply § Deixe uma Resposta