Snippets: Alter Author Bio URL

/**
 * Example showing how to change author bio URL by filtering the author data.
 */
add_filter( 'wpex_post_author_bio_data', function( $data ) {

	// Get global post
	global $post;

	// Add custom URL for post author with ID of 1
	if ( ! empty( $post->post_author ) && 1 == absint( $post->post_author ) ) {
		$data['posts_url'] = 'CUSTOM URL';
	}

	// Return data
	return $data;

} );

Snippet Type: PHP

Posted Under: Blog

All PHP snippets should be added via a child theme's functions.php file.