Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1491447

    Hi everyone,
    I would like to know how to edit the author page. This page shows all the articles written by the author. Question #1: Is it possible to display these items in a grid or list layout? The articles are now shown in full. On the blog layout I set the grid, but it is not shown here.
    Question number 2: alternatively, can I customize the author page as I prefer? Maybe only showing some articles and not all?

    Thanks for your support!

    #1491540

    sadly the filter avf_post_slider_args is not implemented in the author archive.
    It is ruled by author.php and loop-author.php.

    So we have to built a custom loop-author.php.

    here is my loop-author.php on pastebin:
    see: https://pastebin.com/2vuxUhSH
    download: https://pastebin.com/dl/2vuxUhSH

    put it inside your child-theme/includes folder.
    – now you have a filter to rule the layout:

    add_filter( 'avf_author_loop_args', function( $atts, $context ) {
        if( $context == 'author' ) {
            $atts['type']         = 'grid';  
            $atts['columns']      = 4;               // columns count (bei grid)
            $atts['preview_mode'] = 'custom';        // 'auto' oder 'custom'
            $atts['image_size']   = 'gallery';       // 'portfolio', 'gallery', 'square', etc.
            $atts['contents']     = 'excerpt_read_more'; // 'excerpt', 'excerpt_read_more', 'title', 'content'
        }
        return $atts;
    }, 10, 2);

    and for styling to quick css:

    #top.author .av-author-grid-container {
      display: grid !important;
      gap: 20px;
      margin: 40px 0;
    }
    
    /* Standard: 4 Spalten */
    #top.author .av-author-grid-container {
      grid-template-columns: repeat(4, 1fr);
    }
    
    /* Dynamisch per Filter */
    #top.author .av-author-grid-container.av-columns-2 {
      grid-template-columns: repeat(2, 1fr);
    }
    
    #top.author .av-author-grid-container.av-columns-3 {
      grid-template-columns: repeat(3, 1fr);
    }
    
    #top.author .av-author-grid-container.av-columns-5 {
      grid-template-columns: repeat(5, 1fr);
    }
    
    /* Responsive */
    @media (max-width: 989px) {
      #top.author .av-author-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
      }
    }
    
    @media (max-width: 767px) {
      #top.author .av-author-grid-container {
        grid-template-columns: 1fr !important;
      }
    }

    see: https://webers-testseite.de/author/guenni007/

    the column count inside that snippet is added as custom-class – so we can react on it by css setting.

    #1491541

    just a moment – pastebin code is edited now _ the read-more button is buggy. …
    …. it is fixed now – download from above

    … maybe we should take out the readmore button – and place it as a sibling to av-author-grid-content. So we can then position it to always be on the bottom of equal height articles. … more to come

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