Support » Theme: Gridbox » Change “read more” text

  • Resolved Kotanji

    (@kotanji)


    Hey,
    how and where can I change the “read more” text/link that appears after each block?

    function modify_read_more_link() {
    return ‘Your Read More Link Text‘;
    }
    add_filter( ‘the_content_more_link’, ‘modify_read_more_link’ );

    doesn’t work and changing

    function gridbox_excerpt_more( $more_text ) {

    return ”;

    }
    add_filter( ‘excerpt_more’, ‘gridbox_excerpt_more’ );

    only adds another “read more” text after the text itself (instead of the box)

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • saurabh.dhariwal

    (@saurabhdhariwal)

    Hello kotanji,

    Put below code into your current theme’s functions.php file located at wp-content/themes/your_current_active_theme/ folder.

    
    function gridbox_more_link() {
     // Get theme options from database.
     $theme_options = gridbox_theme_options();
     // Display read more button if there is excerpt.
     if ( $theme_options['excerpt_length'] > 0 ) : ?>
       <a>" class="more-link"><?php esc_html_e( 'More', 'gridbox' ); ?></a>
     <?php
     endif;
    }
    

    Note : All Changes you done in any file of theme are gone when you update theme. So prefer Child Theme.

    Hope this will helps you.

    Theme Author ThemeZee

    (@themezee)

    An alternative if don’t want to create a child theme and edit the code is the Say What? WordPress plugin.

    You can download it on https://wordpress.org/plugins/say-what/

    Cheers,
    Thomas

    You can download it on https://wordpress.org/plugins/say-what/

    I spent an hour to use the plugin, but failed to fill in correctly:

    Original string

    Text domain  

    Text context  

    Can you help me?

    Many thx!

    function gridbox_more_link() {
     // Get theme options from database.
     $theme_options = gridbox_theme_options();
     // Display read more button if there is excerpt.
     if ( $theme_options['excerpt_length'] > 0 ) : ?>
       <a class="more-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php esc_html_e( 'MORE SIGN', 'gridbox' ); ?></a>
     <?php
     endif;
    }

    This work right

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.