Community Forums › Forums › Archived Forums › General Discussion › Genesis 2.1.0 Breaks Subtitles on Featured Posts Widget
- This topic has 2 replies, 2 voices, and was last updated 11 years, 11 months ago by
macduffie.
-
AuthorPosts
-
July 1, 2014 at 10:07 am #112452
paulc
ParticipantUsing the Subtitles plugin which adds subtitles below post titles using a span class like this:
<span class="entry-subtitle"> some subtitle text</span>After the Genesis 2.1.0 upgrade, any title displayed by the featured post widgets on the homepage, displays everything as part of the title itself, span tags and all. Only widget titles are affected, subtitles are fine on the post itself.
Genesis stripped the symbols from the span tags and sends the code for the symbols to the browser instead, which then displays them instead of operating on them:
<span class="entry-subtitle">some subtitle text</span>
"This isn't showing the code correctly here, it wants to display it, too, just as the browser would, but the symbols around the span are sent to the browser as code."The 2.1.0 changelog mentions changes to titles in several places, including one dealing with widgets, but I can't seem to figure out which bit of code is doing this. I've been digging through a local install, but having difficulty nailing it down.
A test site is here, using the Metro theme which shows the problem. If you click through to the post you'll see the subtitle displays properly.
July 1, 2014 at 12:06 pm #112473paulc
ParticipantIn lib/widgets/featured-post-widget.php:
//Old code Genesis 2.0.2 - works:
`if ( ! empty( $instance['show_title'] ) ) {
if ( genesis_html5() )
printf( '<h2 class="entry-title"><a href="%s" title="%s">%s</a></h2>', get_permalink(), the_title_attribute( 'echo=0' ), get_the_title() );
else
printf( '<h2><a href="%s" title="%s">%s</a></h2>', get_permalink(), the_title_attribute( 'echo=0' ), get_the_title() );}`
//New code Genesis 2.1.0 - broken:
`if ( ! empty( $instance['show_title'] ) ) {
$title = get_the_title() ? get_the_title() : __( '(no title)', 'genesis' );
if ( genesis_html5() )
printf( '<h2 class="entry-title"><a href="%s">%s</a></h2>', get_permalink(), esc_html( $title ) );
else
printf( '<h2><a href="%s">%s</a></h2>', get_permalink(), esc_html( $title ) );}`
Now, I just need to determine if the change is trivial and can be reversed or if it will cause some other issues elsewhere.
July 7, 2014 at 8:47 am #113208macduffie
MemberI am seeing a similar error in the Education theme after I upgraded to Genesis 2.1 in the Featured widget. I check the option to display the page title and, for example, the following is displayed for the About Us Featured Widget: <span data-rel="title">About Us</span>
However, this only appears to be displayed when I am logged in. Otherwise, it is not visible. This issue did not occur Genesis 2.0.2.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.