Support

Home Forums Event Espresso Premium Excerpt more… link

Excerpt more… link

Posted: October 9, 2014 at 3:12 pm

Viewing 4 reply threads


Scott Tuchman

October 9, 2014 at 3:12 pm

http://chipseal.org/2015/ccsa-pavement-preservation-workshop-registration/

Under the Event Location – Description

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.


Lorenzo Orlando Caum

  • Support Staff

October 9, 2014 at 7:35 pm

Hi,

Try this within your child theme’s functions.php or a site specific plugin(https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/):

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


Scott Tuchman

October 9, 2014 at 8:05 pm

Didn’t work in the functions.php of the child theme. I’ll try the plugin route to see if that works.

Wouldn’t it just be easier to tell me what file and where the line of code is so I can just manual change the string?


Dean

October 10, 2014 at 1:56 am

Hi,

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


Scott Tuchman

October 10, 2014 at 6:25 am

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.

Event Espresso