• Resolved chzumbrunnen

    (@chzumbrunnen)


    On https://visualportfolio.co/posts-tiles/ and even on the screenshots here (Example: Masonry + Posts) there is a post-based grid / masonry layout that outputs excerpts.
    I first had some difficulties to find out that I need to activate “Display Excerpt”.
    But even with a second look I couldn’t find a “Display Author”.

    Is there a way to display the author?
    Do I need to create a custom template and/or a custom query?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nK

    (@nko)

    Hi.

    There is no option to display the author, so you will need to create your own Item Style filter the existing template.

    Regards, nK.

    Thread Starter chzumbrunnen

    (@chzumbrunnen)

    Thanks for your answer.

    As you’re developing Visual Portfolio further, it would be nice to add this to your backlog as I feel it wouldn’t be that difficult to add but give “pro” value (which I might be ready to pay for too).

    It actually worked great with my own template by copying meta.php to the theme template folder into visual-portfolio/items-list/items-style/meta.php as explained here:

    https://visualportfolio.co/documentation/developers/changing-default-templates-and-styles/

    and just adding:

    
    <div class="vp-portfolio__item-meta-date">
    <?php
    printf(
        /* translators: %s: post author */
        /*__( 'Published by %s', 'twentynineteen' ),*/
        esc_html( get_the_author() )
    );
    ?>
    </div>
    

    Not sure if all is “best practices” but keep it here as a reference if someone else (or myself later) has the same requirement.

    • This reply was modified 1 year, 10 months ago by chzumbrunnen. Reason: typo: too much white space in code example
    • This reply was modified 1 year, 10 months ago by chzumbrunnen.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display authoriw’ is closed to new replies.