WordPress.org

Ready to get started?Download WordPress

Forums

Pinboard
Adding Read more link (1 post)

  1. Wakil Nikzad
    Member
    Posted 1 year ago #

    Hello everyone,
    The Pinboard theme is super, but I want to bring a small change, when I am posting new topics it shows only 40 words in the front page which is very nice, however it has a permalink but I want to add a "Read more" link too.
    I found the following section in my functions.php but I don't know what code should be added into it to get "Read more" link.

    This is my website

    if ( ! function_exists( 'pinboard_excerpt_length' ) ) :
    /**
     * Change the number of words shown in excerps
     *
     * @since Pinboard 1.0
     */
    function pinboard_excerpt_length( $length ) {
    	if( pinboard_is_teaser() ) {
    		if( has_post_format( 'aside' ) )
    			return 36;
    		else
    			return 22;
    	} else
    		return 40;
    }
    endif;
    
    add_filter( 'excerpt_length', 'pinboard_excerpt_length' );
    
    if ( ! function_exists( 'pinboard_excerpt_more' ) ) :
    /**
     * Changes the default excerpt trailing content
     *
     * Replaces the default [...] trailing text from excerpts
     * to a more pleasant ...
     *
     * @since Pinboard 1.0
     */
    function pinboard_excerpt_more($more) {
    	return ' …';
    }
    endif;
    
    add_filter( 'excerpt_more', 'pinboard_excerpt_more' );

    Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic