Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Cómo mostrar extractos de entradas en temas de WordPress

Nota editorial: Ganamos una comisión de los enlaces de socios en WPBeginner. Las comisiones no afectan a las opiniones o evaluaciones de nuestros editores. Más información sobre Proceso editorial.

¿Quieres aprender a mostrar extractos de entradas en tu tema de WordPress?

Al mostrar extractos de entradas en lugar del artículo completo en su blog, puede ayudar a los visitantes a encontrar rápidamente contenido interesante y reducir el tiempo de carga de su sitio.

En este artículo, le mostraremos cómo añadir fácilmente extractos de entradas a su tema de WordPress.

How to display post excerpts in WordPress themes

¿Por qué mostrar extractos de entradas en WordPress?

Por defecto, WordPress mostrará entradas completas en la página de inicio, en la página del blog y en las páginas de archivo de tu sitio web. Sin embargo, esta no es la mejor experiencia para los usuarios que quieren navegar rápidamente a través de las diferentes entradas y encontrar la que quieren leer primero.

También puede implicar mucho desplazamiento, lo que supone un gran problema para los usuarios de smartphones y tabletas.

A medida que publiques más entradas, WordPress también puede dividir tus blogs en varias páginas utilizando la paginación. A medida que las entradas más antiguas se desplazan a otras páginas, suelen recibir menos visitas y menos participación.

Por esta razón, muchos propietarios de blogs muestran extractos de entradas en sus páginas de archivo e índice del blog. Dado que solo se carga una parte de cada artículo, esto puede aumentar la velocidad y el rendimiento de WordPress.

An example of post excerpts in a WordPress theme

WordPress es compatible con / dar soporte a extractos de entradas, pero no todos los temas hacen uso de esta característica.

Dicho esto, vamos a mostrarte cómo mostrar extractos de entradas en cualquier tema de WordPress.

Cómo comprobar si su tema de WordPress es compatible con extractos de entradas

La mayoría de los temas populares de WordPress tienen un ajuste que le permite mostrar extractos de entradas en lugar de la entrada completa.

Para ver si su tema es compatible con extractos de entradas, visite la página Apariencia ” Personalizar en el escritorio de WordPress.

La ubicación de estos ajustes variará en función de su tema de WordPress, pero debe buscar los ajustes etiquetados como “Blog”.

Adding post excerpts to a WordPress theme using the Customizer

Por ejemplo, si utiliza el tema Astra de WordPress, deberá seleccionar “Blog” y, a continuación, hacer clic en “Blog/Archivo”.

A continuación, desplácese hasta la sección “Elementos de la entrada” y despliegue la pestaña “Extracto”. Una vez hecho esto, selecciona la opción “Extracto”.

Adding post excerpts to your WordPress website

Si su tema tiene una opción de “Ajustes del tema” o “Ajustes generales de la entrada”, también puede activar extractos de entradas en estas secciones.

Una vez hecho esto, basta con hacer clic en el botón “Publicar”. Ahora, si visita el blog, el archivo o la página de inicio, verá un anuncio / catálogo / ficha en lugar de entradas completas.

Si tu tema no es compatible con / dar soporte a extractos de entradas, tendrás que añadirlo. Simplemente usa los enlaces rápidos de abajo para saltar al método que quieras usar:

Método 1: Añadir extractos de entradas a WordPress usando código (Fácil)

Si tu tema de WordPress no es compatible con extractos de entradas por defecto, siempre puedes añadir esta característica manualmente.

Puedes editar los archivos de tu tema de WordPress directamente, pero te recomendamos que crees un tema hijo. De esta forma, cuando actualices tu tema de WordPress, no perderás los cambios realizados.

Para más detalles, consulte nuestra guía para principiantes sobre cómo crear un tema hijo de WordPress.

Una vez hecho esto, tendrá que encontrar la plantilla que controla cada página en la que desea mostrar extractos de entradas. En la mayoría de los temas, será home.php, content.php, category.php y archive.php.

Si necesita ayuda para encontrar el archivo adecuado, consulte nuestra guía para principiantes sobre la jerarquía de plantillas de WordPress.

Una vez hecho esto, simplemente localice el siguiente código en cada archivo:

<?php the_content(); ?>

A continuación, sustituya este código por la etiqueta_excerpt:

<?php the_excerpt(); ?>

Una vez hecho esto, marque / compruebe el archivo en su sitio web. Ahora debería ver extractos de entradas donde antes estaba el artículo completo.

Cambiar la longitud del extracto de WordPress por defecto

Por defecto, WordPress mostrará las primeras 55 palabras de cada entrada y luego añadirá una elipsis (…) para mostrar que hay más contenido.

Puede cambiar esto para mostrar más o menos palabras añadiendo código a su sitio web WordPress. Aunque es posible editar los archivos del tema directamente, esto puede ser complicado.

Un simple error también puede causar muchos errores comunes de WordPress e incluso puede romper completamente su sitio.

Por esa razón, recomendamos usar WPCode. Facilita añadir fragmentos de código en WordPress sin tener que editar los archivos de tu tema. De esta forma, puedes actualizar o cambiar tu tema sin perder el código personalizado.

Primero, necesitas instalar y activar el plugin gratuito WPCode. Para más información, puedes consultar nuestra guía para principiantes sobre cómo instalar un plugin de WordPress.

Una vez activado, visite la página Fragmentos de código ” + Añadir fragmento desde el escritorio de WordPress y haga clic en el botón “Usar fragmento” bajo la opción “Añadir su código personalizado (nuevo fragmento)”.

How to show post excerpts using code

En la siguiente pantalla, escriba un título para el fragmento de código. Esto es sólo para tu referencia, así que puedes usar lo que quieras.

A continuación, abra el menú desplegable “Tipo de código” y seleccione “Fragmento de código PHP”.

Customizing your post excerpts using code

Una vez hecho esto, basta con pegar lo siguiente en el editor de código:

return 100;
}
add_filter('excerpt_length', 'new_excerpt_length');

// Changing excerpt more
function new_excerpt_more($more) {
return '...';
}
add_filter('excerpt_more', 'new_excerpt_more');

Este código cambia la longitud del extracto de la entrada a 100 caracteres. Puede cambiar el ‘100’ a cualquier número que desee.

Después de pegar el código, cambie el conmutador de “Inactivo” a “Activo” en la esquina superior derecha y, a continuación, haga clic en el botón “Guardar fragmento de código”.

Save and activate code snippet WPCode

Para más consejos sobre cómo personalizar los extractos de sus entradas, consulte nuestra guía práctica sobre cómo personalizar los extractos de WordPress sin código.

Método 2: Añadir extractos de entradas utilizando el editor de sitio completo (solo para temas en bloque)

Si está utilizando uno de los nuevos temas de WordPress en bloque, puede añadir extractos de entradas utilizando el editor de sitio completo.

Para empezar, diríjase a Apariencia ” Editor en el escritorio de WordPress.

Using the full-size editor (FSE)

Por defecto, el editor de sitio completo muestra la plantilla de inicio de su tema, pero puede añadir un extracto a cualquier plantilla.

En el menú de la izquierda, basta con hacer clic en “Plantillas”.

Displaying post excerpts in WordPress using the full-site editor (FSE)

Ahora verá una lista de todas las plantillas que componen su tema de WordPress. Dependiendo de su tema, es posible que desee añadir extractos al archivo, índice, búsqueda o plantilla similar.

Sólo tienes que buscar la plantilla que quieres editar y darle un clic.

Displaying post excerpts using the WordPress full-site editor (FSE)

WordPress mostrará ahora una vista previa de esta plantilla.

Para editar la plantilla, haga clic en el icono del lápiz pequeño.

Displaying post excerpts using the WordPress full-site editor (FSE)

Ahora, haz clic en el icono “+”.

En el panel de búsqueda que aparece, escriba “Extracto de entrada”.

Adding the post excerpt block to a block-based WordPress theme

Cuando aparezca el bloque adecuado, arrástralo y suéltalo en tu estructura / disposición / diseño / plantilla.

Puede repetir este proceso para añadir varios extractos de entradas a la plantilla.

Adding the post excerpt block to a block-based WordPress theme

Para ajustar el aspecto del extracto, basta con hacer clic para seleccionar el bloque Extracto de entrada.

En el menú de la derecha, puede empezar por elegir si el enlace “Leer más” aparece en la misma línea que el extracto utilizando el conmutador “Mostrar enlace en nueva línea”.

Adding a read more button to a blog archive page

Una vez hecho esto, selecciona la pestaña “Estilos”. Aquí puedes cambiar el color del texto, añadir un color de fondo, cambiar el tamaño de la letra, etc.

A medida que realice cambios, la vista previa se actualizará automáticamente, de modo que podrá probar distintos ajustes para ver cuál es el más adecuado.

How to customize a WordPress post excerpt

Cuando esté satisfecho con cómo se ha establecido el extracto de la entrada, haga clic en el botón “Guardar” para aplicar los cambios.

¿Quieres mostrar extractos de entradas en más páginas y entradas? Entonces simplemente repita los pasos anteriores, pero esta vez elija una nueva plantilla en el menú de la izquierda.

Método 3: Añadir extractos de entradas a WordPress usando un maquetador de temas (Avanzado)

Si desea tener un control total sobre el aspecto del archivo, la página de inicio, la página del blog y el resto del sitio, puede crear un tema personalizado.

Esto le permite diseñar sus propias páginas y mostrar extractos en cualquier lugar de su sitio web.

SeedProd es el mejor maquetador de temas de WordPress que te permite crear fácilmente un tema de WordPress personalizado sin escribir ningún código. También tiene un bloque de entradas listas que puedes arrastrar y soltar en cualquier página.

Nota: Existe un plugin gratuito de SeedProd que te permite crear bonitas páginas en modo Próximamente y Mantenimiento, sin importar tu presupuesto. Sin embargo, necesitarás el plan SeedProd Pro o Elite para desbloquear el maquetador de temas.

Primero, necesitas instalar y activar el plugin SeedProd. Para más detalles, consulte nuestra guía paso a paso sobre cómo instalar un plugin de WordPress.

Una vez activado, vaya a la página SeedProd ” Ajustes e introduzca la clave de licencia del plugin. Puede encontrar esta información en su cuenta del sitio web de SeedProd.

Adding a SeedProd license key to WordPress

Después de introducir la clave de licencia, estará listo para crear un tema de WordPress personalizado utilizando el maquetador de temas de SeedProd.

En primer lugar, debe ir a la página del maquetador de temas de SeedProd “.

The SeedProd theme builder

Aquí puede utilizar uno de los kits y plantillas de sitio SeedProd ya preparados como punto de partida o crear manualmente una plantilla desde cero.

Recomendamos empezar con un tema existente, ya que crea automáticamente todos los archivos de plantilla necesarios y le da una ventaja.

Dicho esto, haga clic en el botón “Kits de plantillas de temas”.

Creating a custom WordPress theme using SeedProd

Ahora puede elegir cualquiera de las plantillas disponibles.

Todos estos temas son totalmente personalizables, por lo que podrá adaptarlos a la perfección a su blog o sitio web en WordPress.

Choosing a theme template for your WordPress website or blog

Tras elegir un tema, SeedProd creará automáticamente todas las plantillas de temas que necesite.

Puede considerarlo como la versión borrador de su tema personalizado de WordPress.

Customizing the blog, archive, and search pages using SeedProd

Ahora puede personalizar cada plantilla utilizando el editor arrastrar y soltar de SeedProd.

Como queremos añadir extractos de entradas a nuestro sitio web, pasa el ratón por encima de la plantilla“Índice, archivos y búsqueda del blog” y haz clic en el enlace “Editar diseño” cuando aparezca.

How to add post excerpts to your WordPress theme with SeedProd

Esto cargará el editor de arrastrar y soltar de SeedProd.

A la derecha, verás una vista previa de la plantilla. Por defecto, la plantilla de la página del blog mostrará el encabezado, el archivo, el título y todas tus entradas.

The SeedProd drag and drop theme editor and page builder

La parte izquierda muestra un menú con todos los bloques que puede utilizar.

Puedes añadir nuevos bloques arrastrándolos a la página y luego reorganizarlos arrastrándolos arriba y abajo con el ratón.

Puede personalizar cualquier bloque al hacer clic en él y luego utilizar los ajustes del menú de la izquierda. Cuando realice un cambio, la vista previa de SeedProd se actualizará automáticamente para mostrar esos cambios en acción.

How to customize any block in a WordPress theme

Como queremos personalizar los extractos de las entradas, basta con hacer clic para seleccionar el bloque ‘Entradas’ en la vista previa en vivo.

Una vez hecho esto, seleccione el contenido que desea mostrar en este bloque utilizando los ajustes del menú de la izquierda.

Por ejemplo, puede cambiar la estructura / disposición / diseño / plantilla de las columnas, mostrar la paginación, mostrar la imagen destacada y cambiar la etiqueta del título.

How to add post excerpts to a WordPress theme without writing code

Para mostrar el extracto de la entrada, basta con hacer clic en el conmutador “Mostrar extracto” para que se vuelva naranja.

Una vez hecho esto, puede cambiar el número de caracteres que SeedProd muestra en el extracto escribiendo un nuevo número en “Longitud del extracto”.

Adding blog excerpts to a WordPress theme

SeedProd también puede añadir un enlace “Leer más” a cada extracto, que animará a los lectores a abrir el artículo completo.

Puede añadir o quitar este enlaze utilizando el conmutador “Mostrar más información”.

Adding a 'Read More' button to your post excerpts

También puedes sustituir el texto “Leer más” por tu propio mensaje escribiendo en el campo “Leer más”.

Cuando esté satisfecho con cómo se ha establecido el extracto de la entrada, haga clic en el botón “Guardar” situado en la esquina superior derecha de la pantalla.

Customizing the 'Read More' link in a post excerpt

Ahora puede personalizar las otras plantillas de SeedProd yendo a SeedProd ” Maquetador de temas y siguiendo el mismo proceso descrito anteriormente.

Para mostrar los extractos de entradas a los visitantes, primero debe activar su tema SeedProd. Para ello, vaya a SeedProd ” Theme Builder y, a continuación, haga clic en el conmutador “Activar SeedProd Theme” para que aparezca “Sí”.

How to enable a custom WordPress theme using SeedProd

Ahora, si visita cualquiera de las páginas de su blog, verá los extractos de las entradas en directo.

Bonus: Mostrar extractos de contenido protegido por contraseña

Si usted tiene un sitio de membresía, entonces puede tener algún contenido que no está disponible para el público en general. Sin embargo, sigue siendo una buena idea mostrar un extracto de su contenido protegido por contraseña.

Esto puede intrigar a los usuarios y animarles a comprar sus suscripciones para acceder a contenidos exclusivos en su sitio web.

Puede hacerlo fácilmente utilizando Restrict Content Pro, que es un popular plugin de protección de contenidos. Una vez activado, sólo tienes que abrir una entrada de tu agrado en el editor de bloques de WordPress, donde podrás añadir un extracto para ella desde el panel de bloques.

A continuación, puede configurar su restricción en el menú desplegable.

Add an excerpt for the restricted post

Por último, publique la entrada y visite su sitio de WordPress.

Aquí, los usuarios podrán ver el extracto de la entrada y el título del contenido restringido como en cualquier otra entrada. Sin embargo, el contenido en sí estará oculto para el público.

Protected content excerpt preview

Para obtener instrucciones detalladas, también puede consultar nuestro tutorial sobre cómo mostrar un extracto de una entrada protegida por contraseña en WordPress.

Esperamos que este artículo te haya ayudado a aprender cómo mostrar extractos de entradas en temas de WordPress. Puede que también quieras ver nuestra guía sobre cómo ganar dinero online blogueando con WordPress y nuestras selecciones de expertos sobre los mejores plugins y herramientas SEO para WordPress que deberías usar.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Descargo: Nuestro contenido está apoyado por los lectores. Esto significa que si hace clic en algunos de nuestros enlaces, podemos ganar una comisión. Vea cómo se financia WPBeginner , por qué es importante, y cómo puede apoyarnos. Aquí está nuestro proceso editorial .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

El último kit de herramientas de WordPress

Obtenga acceso GRATUITO a nuestro kit de herramientas - una colección de productos y recursos relacionados con WordPress que todo profesional debería tener!

Reader Interactions

94 comentariosDeja una respuesta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Manasi says

    for the plane these this is what worked for me – Go to the home page and clkick edit. Go to the block editor and click on the block – Blog Posts. You will seea setting which states ‘post control settings’

    There you can enable or disable the show excerpt setting

  3. Dicado says

    Hi thanks for this. I don’t have those files in my child theme. If I just go ahead and do this in my parent theme, won’t it be erased if there is an update?

    • WPBeginner Support says

      Correct, if you place it in your parent theme and the parent theme is updated your changes would be lost

      Administrador

  4. John says

    Thanks for this post. I also want to ask for help on how to add padding around excerpt. I have added border lines around my excerpt; the problem is the excerpt is touching the borderlines. How do I add padding around the excerpts, preventing it from touching the borderlines? Thanks in advance.

  5. Atul Jagtap says

    Hi their,
    I am using ‘Enlightenment’ theme but I have a problem that in my post I can’t see the short Post Excerpt ie it’s come blank. And this happened only with ‘Enlightenment’ this theme. Because same code I am using in other theme is working fine. So is anybody give me solution on this?

  6. Sara Pedersen says

    Hello

    I have custom excerpt in the excerpt box for each post. They are a photo link. This has worked for several years and the photo is at the top of the post with the post link below. Suddenly the last 2 posts the excerpt photo is not posting. Any tips to fix this?

  7. Siddhesh says

    Hi,

    I can locate index.php and categories.php in my theme folder but i dont find the mentioned syntax. How do i fix this?

    -Siddhesh

  8. Francesco says

    Hi, maybe my question will sound silly to you but… I never installed WordPress on a server/host, I just suscribed and got the .wordpress.com domain, everything was automatic. So, how can I access these files? I read in the comments about the FTP protocol, which I am familiar with, but who gives the information to enter in the domain with that?

    And while we’re at it, do you suggest to install wordpress by yourself (online I see there are a lot of tutorials and seems easy to do) or continuing as I am doing on the .wordpress.com domain? Maybe one day I will buy the premium and have a direct domain, but besides that, are there any advantages in terms of functionality in installing manually?

    • Javier says

      Hi, you can find those files using a FTP account.

      When you get in to your server files, get in into this route:
      wp-content/themes/ your-theme-name /

      And you will find the files

  9. Tolu says

    Hi there,
    My theme doesn’t support excerpts on the homepage, i’ve enabled excerpts on the blog post and its still not showing on the homepage, i’m not a php pro so i don’t know my way around it.

    Any help would be appreciated.

  10. Sreeharsh says

    Hi, My theme doesn’t support excerpts in the posts page.
    Can you please help me to enable it to display under my page title.
    Thank you. :D

  11. javad says

    hi
    my theme have excerpts option and i enabled it

    and i want to show my post images above this excerpts on index,php

    i used Auto Post Thumbnail and Featured Image plugins

    but i dont know code to show Thumbnail above the posts

  12. Dorine Ogutu says

    Hello, I am a beginner and I am using the Nucleare theme. I can’t find the index.php file. Please help.

    Desparate

    • Constantine says

      You will need to open either the terminal or your cPanel (if you’re using a shared host and it provides this feature), find your wordpress directory, and under the directory there’ll be a folder called “wp-content”, then enter “themes”, and then find the one folder that the name is your currently using one.

      If you’re using a terminal,

      type

      cd /…/…/wp-content/themes/

      and use cd to enter your themes folder that’s where your index.php lies. “…” here means your previous directory of your wordpress root directory, you will need to find that yourself and figure out what it is first you installed your wordpress on your server.

      Not sure if this helps since it’s been awhile, i’m a newbie myself so hope it might help you and others.

  13. Chris says

    I’ve just updated to a responsive theme and all the posts were in excerpt form. From reading this column I was able to change them to full content. What I’d really like is to have my current post in full content mode, so my followers see it as soon as they get on my site, and the older posts in excerpt form, so that the site loads more quickly. Is this possible? Thanks for your help!

    • James says

      @Chris, I’m trying to do the same thing. Did you figure this out (how to show the latest post in full mode, and the rest as “excerpts”)?

  14. Gaurav says

    I am using custom excerpts from wordpress. It is displayed on my home page. But it is not displayed on my original post. I want to display this excerpt just before my actual post with different font styles and font colour.
    Is there a way to do that ?

  15. pase says

    Trying to display a list blog excerpt summary after the blog introduction. Created a custom template for the blog front page. How can I call the blog excerpt summary page from the custom template?

  16. Drew says

    you know there’s a plugin that can resolve this. with ANY tutorials, it’s never 100% clear because there are files or scripts that are different or not available…pending multi-site install or single-site install etc etc. even with your simple instructions, i couldn’t find the proper tag to replace…so i just downloaded a plugin and 1 minute later…fixed.

    • Dawn Youngs says

      I am working in the Organization Theme on WordPress.com. I have managed to set up a static Home Page and a Blog Page which displays my recent posts. I have chosen the summary options for each article in my feed, but when I publish the page I see the full text of each post on my Blog Page. I have set featured images and I have Written Custom Excerpts for my pages and I want a Blog Page displays the excerpts and images with a link to the post page. How in the world do I do this? What is going on with no change between summary and full in the reading section of my settings? Is this an issue with the theme or a general problem in WordPress? I just want a clean simple page that shows a series of excepts for a weekly report, please help!

      By the way, I do not know how to open my files, I cannot even find my file directory, and wonder if it is hidden from me because I am in .com and not hosting the site myself like in .org?

  17. Rahul says

    I have used experts for some of my posts but i found a problem, special signs like,”! are not rendering properly and there’s some utf-8 problem… can you guys conform whether its a WordPress problem or my hosting. Though the problem only causes in my excerpts (summary) but the article with “are opening up fine” and can be read properly. If its a WordPress issue please let us know if there’s any solution to it.

    Thanks,
    RAHUL

  18. Seth says

    I am using the twentythirteen template. None of the files mentioned have “the_content” in them. Also, there is no longer a “loop.php” file. (I only want my archives – tag and category to have the excerpt).

    This is what I see in the archives.php and category.php:

    Changing ‘content’ to ‘excerpt’ also doesn’t seem to do the trick.

      • Imoteda says

        whenI change it in content.php, I can no longer see the full posts on any pages. Clicking on the continue reading link gives me the same excerpt

        • Jenn says

          I’m having the same issue. I successfully changed the_content to the_excerpt. This makes my blogroll successfully show the excerpt instead of the full post. However, when I click into a post, only the excerpt is shown. Is there a way to modify the single.php file to guarantee the entire post content is displayed when viewing a single post? Any advice is really appreciated!

  19. lester says

    finally . . . . FINALLY !!

    i FINALLY found an answer to a problem with wordpress.

    for the love of God and flowers and good food and wine!

    thank you !! thank you !! thank you !!

  20. Daniel Z says

    Thanks! This worked like a gem in the inStyle theme by Elegant Themes. I actually had to edit the code in home.php, but thanks for leading me in the right direction.

  21. Trenton Miller says

    This is great, it’s working for me now. I would like to have the images that I have at the beginning of blog posts that I inserted via HTML, not the Featured Image method. On the blog posts where the image is within the first 55 characters, or whatever you set it to, how can I get it to appear? Is there something extra to add into functions.php?

    • Editorial Staff says

      Automatic excerpts do not show HTML elements. You have two options. Either write a custom excerpt using the excerpts field in your write panel. If you don’t see it, then look at the top right hand corner “Screen Options”. The other option is to use the_content, and utilize the more tag.

      Administrador

      • Caroline says

        Ouuch – thanks for your comment. I was searching for hours for this information. Such simple but well hidden if you don’t know how to add individual excerpts. Was looking to change the php files but did not dare for missing experience. All set now, thanks again.

  22. Dr. Erika says

    This is AWESOME. Seriously thank you wpbeginner for all your articles.

    Any idea of how to add pictures to the displayed excerpts?

  23. Bridget says

    OMG dude, thank you so much for this! I literally spent like 45 minutes trying to figure this out with an elegant theme, only to find that your solution took about 12 seconds. Gahh! Oh well, all is well that ends well! Thanks!

    • Deepak says

      Hye Sudip,
      Open any post to edit. On the top of it you will find the screen option. Click on that , then you will see so many options there. Then go to the excerpt option , check on that option. Then below the title and content box, you can see the excerpt box .You can write your excerpt content there.

  24. Jay Madisson says

    Hi,

    Im just wondering, where can I find the (Open your index.php file, archive.php file, and category.php file.)? Sorry for being a noob in HTML :(

    Cheers,

    Jay MAdisson

    • Jerry says

      I’m sorry, are we speaking here of files that reside on my computer? I thought the whole blog was done online. I have no software for WordPress on my computer. I have not downloaded anything. What am I missing? Does one have to know HTML code to blog?

  25. Rich says

    Hello, I’m using the 2010 theme on the blog and it didn’t change to when I replaced content with the word excerpt. Is it something I’m leaving out??

  26. Emma says

    I am using the new twenty twelve theme to base a child theme on and cannot get excerpts to work at all. I looked in all the files you suggest above, but cannot find
    in any of them. Similar to Heather I have imported my blog from blogger too…
    There also doesn’t seem to be a loop.php file
    Help!

      • Emma says

        Thanks for this – I changed entry-content in content.php to

        and it has worked!

        The problem I have now is how to get the excerpt text to wrap around the thumbnail, which I would like to float either right or left.

        Any ideas?

        Thanks

  27. Erin says

    Maybe you can help me here. There is no in any of the files you listed above; index.php, archive.php, or category.php. This is the closest thing that I see (from my index.php file).

    Can I change something in this code or add some new code?

    • Editorial Staff says

      If none of those files exist, that means you are using a child theme. You will have to utilize the hooks in the parent theme framework. We don’t write tutorials specific for theme frameworks.

      Administrador

  28. Chris says

    I’m using the twentyeleven theme and “the_content” does not appear in any of the three files mentioned. I’m stumped.

  29. HemantKokcha says

    I am trying to get excerpt but i cant get excerpt by both of your method so tell me correctly how wll i get excerpt in traction theme.

    • wpbeginner says

      @HemantKokcha There is only one method… changing the_content to the_excerpt… The other function is to controlling excerpt length and the excerpt read more. If its not showing in your theme, then perhaps try contacting the theme author. Because this is the only way of doing it.

  30. clwdk says

    Hi there,

    I am using the newest version of the twenty ten theme and am not sure where to change the <?php the_content(); ?> to <?php the_excerpt(); ?>. There is nothing in the index.php as far as I can see. Am I overlooking something? Thanks for any help you can give me.

    CARL

  31. wpbeginner says

    @Ibadullah You have to add this code in your theme’s functions.php file. It should work perfectly fine because this is the way to do it, and we are doing it on our site.

  32. Ibadullah says

    @wpbeginner@Ibadullah I am saying when I add the number in post excerpt – I just see the same number on main page. such as I type 50 in the post excerpt field it show Category name : APPLE and instead of content it show number 50

  33. nescafespk says

    <a href=”http://www.games-masti.com” title=”Play Online Games”>Play Online Games</a>

    This is very nice trick and thanks for help us and thanks for the whole team of the word press team

  34. Carl says

    Great – thanks. Was looking for a simple solution. How do you include a Read more… link after the excerpt also though?

  35. Heather says

    Thank you for the article. I made the changes in all 3 documents and nothing changed. All of the posts on the blog I am working on were imported from Blogger, could that be an issue or perhaps the theme itself? I am stumped!

Deja tu comentario

Gracias por elegir dejar un comentario. Tenga en cuenta que todos los comentarios son moderados de acuerdo con nuestros política de comentarios, y su dirección de correo electrónico NO será publicada. Por favor, NO utilice palabras clave en el campo de nombre. Tengamos una conversación personal y significativa.