Skip to content

Instantly share code, notes, and snippets.

View ejcabquina's full-sized avatar

Elvin Abquina ejcabquina

View GitHub Profile
@ejcabquina
ejcabquina / gist:6608addd50d25ada0c61211e9b98087d
Created March 2, 2021 04:07
generate_content_more_link_output
add_filter('generate_excerpt_more_output', function(){
$custom_text = get_field('read_more_text');
return sprintf( ' ... <a title="%1$s" class="read-more" href="%2$s" aria-label="%4$s">%3$s</a>',
the_title_attribute( 'echo=0' ),
esc_url( get_permalink( get_the_ID() ) ),
$custom_text,
sprintf(/* translators: Aria-label describing the read more button */
_x( 'More on %s', 'more on post title', 'generatepress' ),
the_title_attribute( 'echo=0' ))
);