seothemes / genesis-starter-theme

A starter theme for the Genesis Framework with a modern development workflow
https://demo.seothemes.com/genesis-starter
145 stars 38 forks source link

If empty excerpt of page_for_posts, defaults to excerpt of latest post. Intended? #12

Closed daankortenbach closed 6 years ago

daankortenbach commented 6 years ago

If the excerpt of the page_for_posts page is empty, the page will default to the excerpt of the latest blog post. Is this intended?

https://github.com/seothemes/genesis-starter/blob/f74dfc9b8c08f6bfd30a9666cbb1d31fd408792e/includes/header.php#L175

seothemes commented 6 years ago

No, this is not intentional. It has been fixed in newer themes but is yet to be updated in the starter theme.

I'll push this update soon unless you want to submit a PR. See fix below:

} elseif ( is_home() ) {

    $id = get_option( 'page_for_posts' );

    if ( has_excerpt( $id ) ) {

        printf( '<p itemprop="description">%s</p>', do_shortcode( get_the_excerpt( $id ) ) );

    }

}
daankortenbach commented 6 years ago

ping

seothemes commented 6 years ago

Fixed in latest version/child theme library - https://github.com/seothemes/child-theme-library/blob/master/functions/hero.php#L187