Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Dominykas 3 years, 1 month ago.

  • Creator
  • #1135


    Is there a way to just show the ratings on bbPress topics and not the replies? Thanks.

  • Author
  • #1137


    Hi Angela,

    I hope you are well and thanks for asking! :)

    Yes, the Rating Manager is highly customizable. In order to show the ratings only on bbPress topics, you need:

    1) Make the plugin to hook into bbPress topics and replies by adding this hook name “bbp_theme_after_reply_content” to Rating form location (General tab) > Hook name. Please see this screenshot: http://image.prntscr.com/image/3651be31cc4644c2a604ae727eafc012.png
    2) You need to add the following code to your theme’s functions.php file. It will check every topic and reply, and hide the rating stars for replies.

     * Hide rating stars for bbPress replies.
    function rm_skip_rating_bbp_reply($template) {
    	global $post;
    	if ( get_post_type( $post->ID ) == 'reply' )
    		$template = '';
    	return $template;
    add_action( 'elm_ur_html_template', 'rm_skip_rating_bbp_reply' );

    3) I just tested on my local site and it works well. Result: http://image.prntscr.com/image/d6fe8911ab4c431abc8e62ee5e69c9df.png

    I hope this helps. Please let me know if you have more questions.

The topic ‘[Solved] Turn off ratings for bbPress replies’ is closed to new replies.