Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #256746

    Hello,

    I love how you put custom image is bbpress on this forum,
    I have also done the same, but i always need to use ID no.s

    My bbpress css for moderators doesnot contain the .moderator class,

    like your contains
    #bbpress-forums .bbp-body .moderator div.bbp-topic-content, #bbpress-forums .bbp-body .moderator div.bbp-reply-content

    My bbpress css for moderators is not having the .moderator, hence i am unable to add custom image to them using the above css, need to use user ID for each moderator,

    #256765

    Hey hamzahmauzam!

    You can use this code to add a class to the moderator posts:

    
    add_filter('bbp_get_reply_class','add_extra_forum_class',10,2);
    function add_extra_forum_class($classes, $id)
    {
    	global $post;
    	$authordata = get_userdata( $post->post_author );
    
    	if(isset($authordata->allcaps) && !empty($authordata->allcaps['delete_others_replies']))
    	{
    		$classes[] = 'moderator';
    	}
    
    	return $classes;
    }
    

    Best regards,
    Peter

    #256766

    Thanks a lot will try and let you know.

    #256941

    Hey!

    Alright. We’ll wait for the update. Thanks!

    Cheers!
    Ismael

    #362760

    It´s exactly for what I´ve searched and it works like a charm.. : ) Thanks for this!!

    Best regards,
    Bruno

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Moderator custom image and css’ is closed to new replies.