Skip to:
Content
Pages
Categories
Search
Top
Bottom

ADD custom HTML in keymaster reply


  • sajjad
    Participant

    @sajjad203

    Hi. i want to add custom html under the keymaster’s name in his reply.
    My html is: <p class="supportteam">I im in supporting group</p>

    I have all bbpress’s files in my theme and think that the loop-single-reply.php should be modify but can’t find the correct solution to do it.
    Here is my purpose: http://i.cubeupload.com/ZSr3pR.png
    my loop-single-reply.php :

    <div id="post-<?php bbp_reply_id(); ?>" <?php bbp_reply_class(); ?>>
    	<div class="bbp-reply-author">
    		<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
    		<?php bbp_reply_author_link( array( 'type' => 'avatar', 'show_role' => false ) ); ?>
    		<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
    	</div><!-- .bbp-reply-author -->
        <div class="bbp-meta">  
        <?php bbp_reply_author_link( array( 'type' => 'name', 'show_role' => false ) ); ?>   
        " title="<?php bbp_reply_title(); ?>" class="bbp-reply-permalink"><span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
       <!--HERE IS a place for my new code -->
        </div>
    	<div class="bbp-reply-content">
    		<?php do_action( 'bbp_theme_before_reply_content' ); ?>
    		<?php bbp_reply_content(); ?>
    		<?php do_action( 'bbp_theme_after_reply_content' ); ?>
    	</div><!-- .bbp-reply-content -->
        <?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
    		<?php 
    		$args = array (
    			'id'     => 0,
    			'before' => '<span class="bbp-admin-links">',
    			'after'  => '</span>',
    			'sep'    => ' / ',
    			'links'  => array()
    		);
    		bbp_reply_admin_links( $args ); ?>
    		<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
    </div><!-- #post-<?php bbp_reply_id(); ?> -->

    I tried this code but it does not work:


    <?php
    $role=bbp_get_reply_author_role();
    if($role == 'keymaster'){echo '<p class=="supportteam">I im in supporting group</p>';}
    ?>

    It not show anythings!
    Can you help me to correct this code?
    When i use this:

    $role=bbp_get_reply_author_role();
    echo $role;

    it print reply author’s role.

Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar