• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Genesis 2.1.0 Breaks Subtitles on Featured Posts Widget

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Genesis 2.1.0 Breaks Subtitles on Featured Posts Widget

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 9 years, 2 months ago by macduffie.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 1, 2014 at 10:07 am #112452
    paulc
    Participant

    Using 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=&quot;entry-subtitle&quot;>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 #112473
    paulc
    Participant

    In 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 #113208
    macduffie
    Member

    I 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.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble