Add Excerpt to Recent Posts Element of X Theme

As of X 6.1.6, the Classic Recent Post element still do not have the built-in option to include the excerpt text of the posts.

To do that, add this code to the functions.php file of the child theme:

To further style the excerpts, you may start with this CSS code which may be placed in the Global CSS of the child theme’s style.css:

[css] .x-recent-posts .x-recent-posts-excerpt {
font-size: 0.95em;
padding: 10px 0;
}

.x-recent-posts .x-recent-posts-excerpt p {
margin-bottom: 0;
}
[/css]

Leave a Reply

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