what is the reply template tag
-
Hi,
I am making a shortcode for bbpress use profile and here is the function
add_shortcode('myprofile', 'show_bb_profile'); function show_bb_profile() { ob_start() ?> <?php do_action( 'bbp_template_before_user_details' ); ?> <div id="bbp-single-user-details"> <div id="bbp-user-avatar"> <span class='vcard'> <a class="url fn n" href="<?php bbp_user_profile_url( get_current_user_id()); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?>" rel="me"> <?php echo get_avatar( bbp_get_displayed_user_field( 'user_email', 'raw' ), apply_filters( 'bbp_single_user_details_avatar_size', 150 ) ); ?> </a> </span> </div><!-- #author-avatar --> <div id="bbp-user-navigation"> <ul> <li class="<?php if ( bbp_is_single_user_profile() ) :?>current<?php endif; ?>"> <span class="vcard bbp-user-profile-link"> <a class="url fn n" href="<?php bbp_user_profile_url( get_current_user_id()); ?>" title="<?php printf( esc_attr__( "%s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>" rel="me"><?php _e( 'Profile', 'bbpress' ); ?></a> </span> </li> <li class="<?php if ( bbp_is_single_user_topics() ) :?>current<?php endif; ?>"> <span class='bbp-user-topics-created-link'> <a href="<?php bbp_user_topics_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Topics Started", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Topics Started', 'bbpress' ); ?></a> </span> </li> <li class="<?php if ( bbp_is_single_user_replies() ) :?>current<?php endif; ?>"> <span class='bbp-user-replies-created-link'> <a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Replies Created', 'bbpress' ); ?></a> </span> </li> <?php if ( bbp_is_favorites_active() ) : ?> <li class="<?php if ( bbp_is_favorites() ) :?>current<?php endif; ?>"> <span class="bbp-user-favorites-link"> <a href="<?php bbp_favorites_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Favorites", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Favorites', 'bbpress' ); ?></a> </span> </li> <?php endif; ?> <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?> <?php if ( bbp_is_subscriptions_active() ) : ?> <li class="<?php if ( bbp_is_subscriptions() ) :?>current<?php endif; ?>"> <span class="bbp-user-subscriptions-link"> <a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Subscriptions", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Subscriptions', 'bbpress' ); ?></a> </span> </li> <?php endif; ?> <li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>"> <span class="bbp-user-edit-link"> <a href="<?php bbp_user_profile_edit_url( get_current_user_id()); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Edit', 'bbpress' ); ?></a> </span> </li> <?php endif; ?> </ul> </div><!-- #bbp-user-navigation --> </div><!-- #bbp-single-user-details --> <?php do_action( 'bbp_template_after_user_details' ); ?> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
However, I am able to get the profile link for a user by this template tag
get_current_user_id()
but how what is the template tag for a user to his replies & topics.
Thanks in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.