Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbp_author_link

Codex Home → bbp_author_link

Description

The ‘bbp_author_link’ function is used to display the most recently active author’s avatar and username linked to their profile

How to use it

<?php bbp_author_link( $args ); ?>

$args (optional) – Accepts an array of arguments to configure display ( post_id, link_title, type, size )

Uses bbp_get_author_link()

Sample code example

<?php bbp_author_link(); ?>

Displays the linked avatar and username for the most recently active author in a forum

<?php bbp_author_link( array( 'post_id' => 1 ) ); ?>

Displays the most recently active user from the topic with an ID of 1

<?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 32 ) ); ?>

Displays the most recently active user within the forum and sets their avatar to a size of 32px wide and 32px tall

<?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'link_title' => 'Author profile' ) ); ?>

Displays the most recently active user within the forum and sets the title of their linked avatar and username to “Author profile”

<?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'type' => 'avatar' ) ); ?>

Displays only the most recently active user’s avatar without their display name

<?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'type' => 'name' ) ); ?>

Displays only the most recently active user’s display name without their avatar

bbp_reply_author_link()
bbp_topic_author_link()

Skip to toolbar