I’m experiencing something that I can’t quite explain. On a blog post I want to display the poster name like this
Posted <?php echo time_ago(); ?> <?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?>
But it just stays empty. With debug mode I get this:
Notice: Trying to get property of non-object in /Users/.../Sites/wordpress.mu/wp-content/themes/custom/_inc/custom-single.php on line 133
I can’t really figure out what’s happening. Is there someone who could help me out here?
I have no problems fetching the avatar of the poster though: <?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?>
Running latest versions of WP and BP.