Search results already show excerpts (summary of the posts). If you want to show excerpts in tag pages, author pages,homepage and category pages. to show complete post only on individual post pages.You can change the content.php of wordpress twenty thirteen theme.
The content.php page of theme is generally located at /wp-content/themes/twentythirteen/
You can directly edit the page from there or from wordpress dashboard >> appearance >> editor >> select content.php
You need to change this default code to
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<?php if ( is_search() || is_author() || is_tag() || is_archive() || is_home () ) : // display excerpts for search, author,tags, archive, and, most definitely home ?>
You can remove the particular page in code if you don’t need them there. This code will make WordPress Twenty Thirteen Show Excerpt.
23 thoughts on “WordPress Twenty Thirteen Show Excerpt”
I do not see <?php if(is_search()… in the index.php file. where is this located?
Thanks for the comment ! It should be content.php instead of index.php.
I’ve edited post as well.
Thanks for the comment !
It should be content.php instead of index.php that contains < ?php if(if_search)):.. is located at your theme folder wordpress root folder/wp-content/themes/twentythirteen/content.php I've edited post as well
This is the Twenty Thirteen index.php file… can you point out what I need to change to have the excerpt show up everywhere? Also, I would like to customize the link of the excerpt. THANKS SO MUCH!!!!
do you mean I need to add the above code into index.php?
For easy editing you can edit the theme from wordpress dashboard > Appearance > Editor
At right side you can see content.php
You need to replace this block of code :
< ?php if ( is_search() ) : // Only display Excerpts for Search ?>
< ?php if ( is_search() || is_author() || is_tag || is_archive() || is_home () ) : // display excerpts for search, author,tags, archive, and, most definitely home ?>
Do i put this code in the index.php file to show excerpts? Or where? I do not see the (is_search) in the index.php by default. Thanks for your help!
Had problems until I changed ‘ is_tag ||’ to ‘ is_tag() ||’
Is that correct…!
Yes you are right.
I have edited the post as well.
Thank you !
Depp,it should be should be content.php instead of index.php. I have already edited the post.
Thanks for pointing out mistake
I don’t see this code anywhere on the index.php file.
Thank you Nickel for pointing out the mistake in my post. I have already edited the post it should be content.php instead of index.php
check your content of main index templete
wordpress dashboard > Appearance > Editor
At right side you can see content.php
As others have said, the original code you referenced does not exist in the Main Index Template.
Thank you Jaracely for pointing out the mistake in my post.I have edited the post it should be content.php instead of index.php
this is great thank! but when i do this, there is no little ‘read more’ link at th eend of the exceprt which i think would be helpful. how do i get this?
My Pleasure !
You can use to add a “read more” link.
that was very helpful, thank you! It seems that you are having the same problem I did with the sidebar in this theme. Some of the links are dissapearing under the bar. This theme was designed to use the footer as the main widget zone but some of us do have a preference for a sidebar which seems like an after thought by the programmers IMHO.
worked great for me after trying to figure out the code myself with no luck – thank you very much!
Hi, thanks for your solution. But, how to add pic thumbnail on it?
Hi, thanks for your solution, but how to add pic thumbnail?
You can add thumbnail using thumbnail for excerpt plugin .Though it is not .updated since long time but it still works.
Hello, I have a related problem. In my content.php the default code is set for excerpt on search results, but my search results are not excerpting. We have the Genesis and Twenty Thirteen themes and child theme. I didn’t build it, but I am trying to learn/figure out how to fix it. I also can’t figure out how to remove the meta (date, author) and “filed in” info from the search results. I have tried deleting from content.php, but that didn’t work. Thanks.