Is there any way to change the word “more…” to “read more” or caps or some other way that makes it real obvious that the text is an excerpt. Currently it looks like an out of place word in an incomplete sentence and does not denote a “Read More” link.
function mycustom_filter_gettext_more_link( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'more' => ' READ MORE'
);
// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'mycustom_filter_gettext_more_link', 10, 3 );
—
Lorenzo
This reply was modified 10 years, 1 month ago by Lorenzo Orlando Caum. Reason: edit
Drop the …’s and just use the above function to change the word more instead.
If you wish to edit the file directly (we don’t recommend this, and updates will over write your changes), you can do so in this file: /wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Venue_View.helper.php at approx line 154
Thanks Dean, losing the three periods (…) did the trick with the code you provided.
Viewing 4 reply threads
The support post ‘Excerpt more… link’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.