This topic is: not resolved
- This topic has 0 replies, 1 voice, and was last updated 1 year, 10 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
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.
Community Forums › Forums › General Genesis Framework Discussions › Excerpt text in single and frontpage
Helo everyone,
I am using the latest version of the Revolution Pro theme.
My requirement is to show excertp text in the single article but also in frontpage.
The theme is set to show the latest articles in frontpage.
I found this script:
//* Add Excerpt support to Pages in Genesis
add_post_type_support( 'page', 'excerpt' );
//* Display Excerpt as Post Subtitle in Genesis
add_action( 'genesis_entry_header', 'wpsites_excerpt', 10 );
function wpsites_excerpt() {
if ( is_singular( 'post' ) && has_excerpt() ) {
/*if ( is_singular( 'post' && 'page' ) && has_excerpt() ) {*/
printf( '<p class="excerpts">%s</p>', get_the_excerpt() );
}
}
It works fine but only in the single article, in frontpage it is not shown.
Can you please help me? Thanks
© 2024 WPEngine, Inc.