Change title tag

The title parameter lets you define a title to appear above the post listing. This uses the <h2> element by default.

[display-posts title="Recent Posts"]

You can use the display_posts_shortcode_title_tag filter to modify what heading is used. The code below changes this to an h4.

This code snippet goes in a core functionality plugin or Code Snippets.

Filters used:

Published by Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributor to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Leave a comment

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