How To: Solve duplicate content in WordPress without plugins Cómo: Resolver el contenido duplicado en WordPress sin plugins

ADVERTISEMENT PUBLICIDAD
To get our software and web/tips via email, sign up for Para conseguir nuestro software y web / sugerencias por correo electrónico, para firmar daily email newsletter boletín diario por correo electrónico . .
Subscribe to RSS feed Suscribirse al feed RSS or o follow me me siguen on Twitter? en Twitter?

Duplicate content is a serious issue for all WordPress blogs, and most bloggers now employ different methods to show partial content. El contenido duplicado es un problema grave para todos los blogs de WordPress, y la mayoría de los bloggers ahora emplean diferentes métodos para mostrar el contenido 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. Los blogs que sólo con buenos rankings de búsqueda que emplean los puestos completo, por lo general los blogs son la autoridad, que estén etiquetados como seguros y autorizada por el algoritmo de Google.

Plugins are a popular method to reduce duplicate content. Los plugins son un método popular para reducir el contenido duplicado. However, plugins are not Sin embargo, los complementos no son fully optimized totalmente optimizado , and consumes more server resources than the simple <?php the_excerpt() ?> tag. , Y consume más recursos del servidor que la simple <?php the_excerpt() ?> Etiqueta. Moreover, excerpt tag can use the customized post summary that you may have written. Además, la etiqueta del extracto puede utilizar el resumen posterior a medida que usted puede tener por escrito.

In this short tutorial, you should have all the template files in one place. En este breve tutorial, usted debe tener todos los archivos de plantilla en un solo lugar. Once you have those files(probably downloaded from your server, or a local copy that you keep), follow these easy steps: Una vez que tenga los archivos (probablemente descargado de su servidor, o una copia local que mantenga), siga estos sencillos pasos:

ADVERTISEMENT PUBLICIDAD

  • Open up index.php , archive.php and search.php Abra index.php archive.php y search.php
  • In each of these files, search and find the code bit that contains <php the_content En cada uno de estos archivos, buscar y encontrar el pedazo de código que contiene <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: Vuelva a colocar la etiqueta de todo - por lo general <? Php the_content (__(' Leer el resto de esta entrada'));?> (puede cambiar dependiendo de tema, pero será similar), con esta etiqueta:
    <?php the_excerpt();?> <? php the_excerpt ();?>
    Save the files. Guarde los archivos.
  • Open up index.php again, and save it as category.php (do not discard index.php ). Abra index.php de nuevo, y guárdelo como category.php (no se descarta 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. En los pasos anteriores, hemos sustituido la etiqueta de contenido con la etiqueta de extracto de modo que sólo un breve párrafo de la entrada se muestra en las páginas, excepto la página de entrada. Most themes lack a category.php , and its absence can allow full posts on category pages. La mayoría de los temas carecen de una category.php y su ausencia puede permitir que los puestos completo en las páginas de categoría. By duplicating the index.php file(which has excerpt tag), that problem is also solved. Al duplicar el archivo index.php (que tiene etiqueta de extracto), que el problema también está resuelto.

Open Mic Open Mic

How do you prevent duplicate content? ¿Cómo evitar que el contenido duplicado? Do you use this method, or any plugins? ¿Se utiliza este método, o los complementos? 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). Si es así, ¿por qué se prefiere sobre la etiqueta de extractos? (Me gustaría escuchar, como yo mismo estoy confundido en el método a utilizar). Do tell me your views through comments. Me digas tus puntos de vista a través de comentarios.

To get our latest articles, Para conseguir nuestros últimos artículos, click here to sign up haga clic aquí para registrarse for our free email newsletter or subscribe to a nuestro boletín de correo electrónico gratuito o suscribirse a RSS feed RSS feed

§ Comments § Comentarios
  • Nirmal says: Nirmal dice:

    This is exactly what I have been doing. Esto es exactamente lo que he estado haciendo. Use post excerpts. Extractos de entradas uso.

  • Sumesh says: Sumesh dice:

    @Nirmal: Glad to hear your opinion. @ Nirmal: Me alegra oír su opinión. Could you be more specific as to why you prefer it? ¿Podría ser más específico en cuanto a por qué prefiere?

  • Karthik says: Karthik dice:

    Funny to run into this, I'd just blogged about something similar yesterday! Funny a correr en esto, que acababa de blogs acerca de algo similar ayer! And you did this 2 days earlier – guess it was a repeat for you to read my feed then! Y lo hizo 2 días antes - Supongo que fue una repetición para que lea mi feed, entonces!
    [Goes over to subscribe to your feed] [Se acerca a suscribirse a su 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!). Pero me gustaría hacer una aclaración sin embargo - no será necesario si usted tiene category.php archive.php o index.php (err, ciertamente tendría esta misma página). 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 Lo que quería decir - si se va a mostrar extractos en index.php, puede evitar tener archive.php y category.php completo - no me pregunten por qué no, le ahorra 4kb en su espacio web ;)

    The order is: La orden es:
    1. 1. category-xx.php categoría 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. Si desea hacer una categoría particular mirada única, puede crear un archivo con la categoría CATEGORYNUMBER.php categoría en particular y que se siga esta plantilla. If it doesn't find this file, it will check if the next file in the hierarchy is there and so on. Si no encuentra este archivo, se comprueba si el archivo siguiente en la jerarquía está ahí, y así sucesivamente.

    Sorry about the overly long comment, I had to make myself clear! Perdón por el comentario de la excesivamente largo, tuve que hacer yo mismo claro!

  • Sumesh says: Sumesh dice:

    @Karthik: No problem whatsoever about long comments – I love 'em! Karthik @: No hay problema alguno acerca de los comentarios de largo - I love 'em!
    Well, that thing about category-xx.php was something new to me, thanks. Bueno, que lo de la categoría-xx.php era algo nuevo para mí, gracias. And category no. Y la categoría no. means its ID, right? significa que su identidad, ¿verdad?
    As for 4kB webspace, lol En cuanto a 4kB espacio web, lol : D

  • Karthik says: Karthik dice:

    Yup, sorry, I should have mentioned ID there! Yup, lo siento, yo debería haber mencionado ID allí!

  • Sumesh says: Sumesh dice:

    @Karthik: No problem, its understood. Karthik @: No hay problema, de su entender. Now that you've clarified it, readers will also understand. Ahora que ya ha aclarado que, los lectores también lo entenderá.

  • Fred Schebesta says: Fred Schebesta dice:

    My recommendation would be to do this but also have unique content in the excerpt. Mi recomendación sería hacer esto, pero también tienen un contenido único en el extracto.

    I have actually switched categories off entirely and have opted for pages instead. En realidad he cambiado por completo fuera de las categorías y han optado por las páginas en su lugar.

    (Note the blog above is not an example of this ;-D ) (Nota: el blog anterior no es un ejemplo de esto;-D)

  • § Leave a Reply § Deje una contestación