Closed jdahdah closed 10 years ago
You could try something like the following but you may end up seeing subtitles in places that you don't want them to show up:
/**
* Display subtitles in recent posts widget.
*/
function theme_slug_subtitle_view_supported() {
return true;
}
add_filter( 'subtitle_view_supported', 'theme_slug_subtitle_view_supported' );
The issue is that the plugin relies on filtering the_title
but only within The Loop. What the above code does is just return the post subtitle for every post title that's shown on a page, no matter where it's displayed.
Thanks for responding so quickly! You're right, it works, but it does appear in places it shouldn't, like in the document <title>
tag. I've gone with what is probably the least elegant solution: copied the whole WP_Widget_Recent_Posts
class into my theme, registered it as a new widget and modified it to include the subtitle.
Sounds good. That sounds like a pain, though, but I just don't see any other way around it. I'll update this ticket in the future if I run into any elegant solutions that you may be able to use. Cheers.
Alright, thanks for your help!
Subtitles are currently not displayed in the default Recent Posts widget. Is there a way to do this in my theme's functions.php?