Home / learning / wordpress / WordPress Twenty Twelve Theme Post Excerpts in Homepage, Category, Tag, Author and Archive Pages

WordPress Twenty Twelve Theme Post Excerpts in Homepage, Category, Tag, Author and Archive Pages

Publisher:
License:
Filesize:
Price:
Date added: September 27, 2013
Downloads:

Now in this post I will show you how to Display Post Excerpts in all categories and add read more or Continue reading link and display featured image with the excerpts in WordPress Twenty Twelve Theme.

How post excerpts work in WordPress Twenty Twelve Theme?

[table “150” not found /]

These Excerpts are used to display a short summary when a visitor visits your website. By default the excerpts are displayed only in the search page. To add excerpts we need content.php and function.php files. (Take a backup of both files before editing)

Editing Template Files

First open content.php file, Find line no 33 you can see the following code.

This line tells to display excerpts only on the search page. Replace this code with the below code.

Also Read: Find Page, Post, Category ID in WordPress

After adding the code save the file and refresh your web page. Now you can see the excerpts displayed on Homepage, category, tag, author and archive pages.

Add Thumbnail Image and Read More link to WordPress Excerpt Posts

Open function.php file and add the below code at the end of the file.

Save the file. Again open content.php file, Around line no 34 you can see the below code

Below this line add the following code

This code adds the featured image with left alignment and read more link to the posts. Finally open content.php file and around line no 18 you can see the following line.

Remove the line and save the file and refresh your web page. Now you can see the post excerpts in all pages with featured image as a thumbnail. [wpdm_file id=3]

Twenty Twelve Post Excerpts Preview

WordPress-Twenty-Twelve-Theme-Post-Excerpts

Hope you all like this post, If you had any questions let me know through comments.

Click For Display Genericons Icon Font in WordPress Theme 

About Amar

Leave a Reply

Your email address will not be published. Required fields are marked *

*


+ 8 = twelve

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Scroll To Top