WordPress.org

Ready to get started?Download WordPress

Forums

removing "read more" on Buffet Framework main page (2 posts)

  1. giovanealex
    Member
    Posted 4 years ago #

    Hi!

    I'm helping a friend of mine on setting up his new blog and he wants to use The Buffet Framework as the theme but the thing is by default it cuts every post on front page adding the "Read More" tag. I know where this can be changed on filters.php but I don't know how to do it, since I'm not a coder myself. The filter is the one below:

    /**
     * bf_newsbody() - Buffet Framework filter function
     *
     * Displays news content (summary). By default, it displays the first 50 words of the article.
     * You can override this using the <b>bf_newsbody</b> filter.
     *
     * @since	0.5.2
     * @hook	filter	bf_newsbody
     * @return	string	HTML code
     */
    
    function bf_newsbody() {
    	global $post;
    	$output = '<div class="entry-summary">';
    
    	$content = explode( ' ', strip_tags(get_the_content()) );
    	if( count($content) > 50) {
    		$content = array_slice($content, 0, 50);
    	}
    
    	$output .= implode($content, ' ') . '...';
    
    	$output .= '</div><!-- .entry-summary -->';
    
    	$output .= '<a class="more-link" href="' . get_permalink() . '">' . __('Read More', 'buffet') . '</a>';
    
    	echo apply_filters('bf_newsbody', $output);
    }

    Thanks in advance for any help you might give us!

  2. Kolbi
    Member
    Posted 3 years ago #

    hex giovanealex!

    you could replace the the <?php bf_newsbody(); ?>in the file home.php and the <?php bf_archive_postbody(); ?> in the archive.php with <?php the_content(); ?>. This will show up the standart Read more link.

Topic Closed

This topic has been closed to new replies.

About this Topic