Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #492800

    At this moment I am building a site locally and I really would like to show the author in the blog-grid layout, because we have more then one author but we like the grid layout way more then the Multi-author layout. I did find 1 other post about this issue but I can not get the solution to work ( https://kriesi.at/support/topic/show-blog-author-on-blog-grid/.)

    Can you please help me to get this to work in a child theme?

    Cheers,
    Sebastiaan

    #493460
    #493986

    Hi Andy,

    thank you for your help! I got this part working. But now I’ve got an additional question. Is it possible to make the name of the author clickable so that when you click on it you go to the author page and see all the posts he/she added?

    Regards,
    Sebastiaan

    #494603

    Hi!

    Did you follow the instructions on the previous post? You can replace the code with this:

    $authorlink = get_author_posts_url( get_the_author_meta( 'ID' ) );
    						$author = the_author();
    $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time> / by <a href=". $authorlink . ">". $author ."</a>";
    						$output .= "</div>";
    

    Best regards,
    Ismael

    #495713

    Hi Ismael,
    I Thought i had it working, but now it does show the author name above the featured Image and on the home page I got all the names inside the header.

    The code I’ve got right now is:

    $author = get_the_author_meta( 'first_name', $entry->post_author ).' '.get_the_author_meta( 'last_name', $entry->post_author );
    $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time> / by ".$author;
    						$output .= "</div>";
    

    Best regards,
    Sebastiaan

    • This reply was modified 9 years, 2 months ago by Pink_Monkey. Reason: not working after all
    #495717

    Hi Ismael,
    I’ve been combining some code and got it working. This is the final code I am using

    $authorlink = get_author_posts_url( get_the_author_meta( 'ID' ) ); $author = get_the_author_meta( 'first_name', $entry->post_author ).' '.get_the_author_meta( 'last_name', $entry->post_author );
    $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time> / by <a href=". $authorlink . ">". $author ."</a>";
    						$output .= "</div>";
    					}
    

    Best regards,
    Sebastiaan

    #495917

    Hi!

    Glad you figured it out and thank you for sharing your solution :)
    Let us know if you have any other questions or issues

    Best regards,
    Yigit

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