Back to Community

How to Customize the Twenty Eleven Showcase Template: From Formatting to Post Display

23 threads Sep 7, 2025 ThemeTwenty eleven

Content

The Twenty Eleven theme's Showcase template is a powerful feature for creating a dynamic homepage. However, many users encounter common issues when trying to customize its appearance and behavior. Based on community discussions, this guide addresses the most frequent questions and provides solutions for tailoring the Showcase template to your needs.

Common Showcase Template Challenges

Users often report the following issues:

  • HTML formatting (like bold or italics) being stripped from featured posts in the slider.
  • Difficulty controlling the number of recent posts displayed.
  • Needing to change the order of posts (e.g., chronological vs. reverse-chronological).
  • Wanting to display posts only from a specific category.
  • The "Recent Posts" section appearing where it's not wanted.

Solutions and Customization Methods

Important Note: The 'Twenty Eleven' team and the wider WordPress community strongly advise against editing the core Twenty Eleven theme files directly. Any modifications should be made in a child theme to preserve changes after theme updates.

1. Modifying the Number of Recent Posts

To change how many posts appear in the "Recent Posts" section below the slider, you must add a 'posts_per_page' parameter to the query in your child theme's copy of showcase.php.

// Display our recent posts...
$recent_args = array(
    'posts_per_page' => 10, // Change this number
    'order' => 'DESC',
    ... // other existing arguments
);

2. Changing the Post Order

To display posts in ascending (oldest first) instead of descending (newest first) order, modify the 'order' parameter in the same $recent_args array.

'order' => 'ASC',

3. Displaying Posts from a Specific Category

To filter the recent posts to a single category, add a 'cat' parameter with the desired category ID.

'cat' => '4', // Replace '4' with your category ID

4. Removing the "Recent Posts" Section Entirely

If your site is more static and you do not want the Recent Posts list to appear on your Showcase page, the most straightforward method is to comment out or remove the section of code in showcase.php that generates it. Look for the block of code that begins with // Display our recent posts... and remove it or wrap it in PHP comments (/* ... */).

5. Preserving HTML Formatting in the Slider

The stripping of style tags from the featured post excerpt is typically by design to maintain a consistent look in the slider. To override this, you would need to create a custom function in your child theme's functions.php file to modify the excerpt generation and allow specific HTML tags. This requires a more advanced understanding of WordPress filters.

Conclusion

Customizing the Twenty Eleven Showcase template is entirely possible through a child theme. The key is identifying the correct section of the showcase.php template file and modifying the WordPress query arguments to suit your needs. Always remember to use a child theme to ensure your customizations remain safe during future updates.

Related Support Threads Support