Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add custom fields to loop-single-reply.php? [example inside]


  • Tenebral
    Participant

    @tenebral

    i want to add some custom fields inside <div class="bbp-reply-author"> </div>.

    I can do this inside user-profile.php using this code:

    <div>
    <?php if ( bbp_get_displayed_user_field( 'twitter' ) ) : ?>
    <a class="tooltip" href="http://twitter.com/<?php bbp_displayed_user_field( 'twitter' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Twitter', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/twitter.png" alt="" /></a>
    <?php endif ?>	
    <?php if ( bbp_get_displayed_user_field( 'facebook' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'facebook' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Facebook', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/facebook.png" alt="" /></a>
    <?php endif ?>
    <?php if ( bbp_get_displayed_user_field( 'google' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'google' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Google+', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/google_plus.png" alt="" /></a>
    <?php endif ?>	
    <?php if ( bbp_get_displayed_user_field( 'linkedin' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'linkedin' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Linkedin', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/linkedin.png" alt="" /></a>
    <?php endif ?>				
    <?php if ( bbp_get_displayed_user_field( 'flickr' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'flickr' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Flickr', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/flickr.png" alt="" /></a>
    <?php endif ?>	
    <?php if ( bbp_get_displayed_user_field( 'youtube' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'youtube' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on YouTube', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/youtube.png" alt="" /></a>
    <?php endif ?>
    <?php if ( bbp_get_displayed_user_field( 'pinterest' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'pinterest' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Pinterest', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/pinterest.png" alt="" /></a>
    <?php endif ?>
    <?php if ( bbp_get_displayed_user_field( 'user_url' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'user_url' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( " 's site", 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/site.png" alt="" /></a>
    <?php endif ?>
    </div>

    But for some reason this didn’t work at loop-single-reply.php, there’s something i’m missing? ty

  • You must be logged in to reply to this topic.
Skip to toolbar