Site logo

Archived topic

generate_blog_columns filter wrapping author-info in author archive

3 replies · Started by akal on October 10, 2022

Viewing posts 1–4 of 4

Hi, thank to this filter we can organize custom post in column grid inside archive 'pages', including the archive author 'page'.

add_filter( 'generate_blog_columns', function( $columns ) {
    if ( 'my_custom_post' === get_post_type() && ! is_singular() ) {
        return true;
    }
    return $columns;
} );

Maybe I missed something, but it appears the author biography (author-info) when it exists, is wrapped inside the generate-columns-container. Could you please check it and let me know if there is something we can do for that ?
Check => https://blockchainyourart.gatcom.fr/community/vernon/

Alternativement, I can easily add the author bio within my block hook element (gb-author-cover), but in that case, I would like to remove (no css!) the existing author biography ("author-info").

Any ideas ?

Hi there,

you can use a PHP Snippet to remove the author description:


add_action('wp', function(){
    if ( is_author() ) {
        remove_action( 'generate_after_archive_title', 'generate_do_archive_description' );
    }
});

No problems - glad to be of help :)

This archived topic is closed to new replies.