pfefferle / autonomie

"Autonomie" is a highly semantic, responsive, accessible and search engine optimized WordPress Theme. It provides HTML5 templates refined with microformats, microformats v2 and microdata (Schema.org). "Autonomie" supports a lot of OpenWeb plugins and is fully IndieWeb compatible.
https://notiz.blog/projects/autonomie/
MIT License
96 stars 21 forks source link

Display of subtitles #53

Closed jeremycherfas closed 2 years ago

jeremycherfas commented 3 years ago

I use a plugin https://github.com/wecobble/Subtitles to have a subtitle if I want one. At present, the subtitle is displayed everywhere that Autonomie uses the_title or get_the_title. In my view, this looks wrong in the H2 that Autonomie creates as a heading for the comments section.

The Subtitle plugin author says that themes should use the_title_attribute rather than the_title. I did try switching this out at various points in the templates, but it made no difference. As far as I can tell, with the plugin activated, the_title_attribute contains the concatenated title and subtitle. I could not get any of the suggested workarounds to work.

For now, I rewrote the section that creates the H2 Comment title. Changing this:

                printf(
                    _n( 'One thought on %2$s', '%1$s thoughts on %2$s', get_comments_number(), 'autonomie' ), // removed quotation marks
                    number_format_i18n( get_comments_number() ),
                    '<span>' . the_title_attribute() . '</span>'
                );
            ?>

to this:

                printf(
                    _n( 'One response to %2$s', '%1$s responses to %2$s', get_comments_number(), 'autonomie' ), // removed quotation marks
                    number_format_i18n( get_comments_number() ),
                    '<span>' . 'this fascinating post' . '</span>'
                );

That works fine for me, now. I think this is the only place where the concatenated subtitle was giving me a problem, but I need to check very carefully.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.