[Support request] Sidebar disappeared (add filter)

Home Forums Support Sidebar disappeared (add filter)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1166915
    Stefan

    Hi Tom,

    I have used the following code from the page woorkup. Now my sidebar is gone, and I would like to undo this.

    add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' );
    function tu_excerpt_metabox_more( $excerpt ) {
    	$output = $excerpt;
            $settings = wp_parse_args( 
    		get_option( 'generate_blog_settings', array() ), 
    		generate_blog_get_defaults() 
    	);
    	
    	if ( has_excerpt() ) {
    		$output = sprintf( '%1$s <a href="%2$s">%3$s</a>',
    			$excerpt,
    			get_permalink(),
                            wp_kses_post( $settings['read_more'] )
    		);
    	}
    	
    	return $output;
    }

    Can you please help me.

    #1167223
    David
    Staff
    Customer Support

    Hi there,

    you can use either of the snippets provided here to display the Read More on custom excerpts:

    https://docs.generatepress.com/article/activating-read-custom-excerpt/

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