Skip to:
Content
Pages
Categories
Search
Top
Bottom

Count voice issued . Please help


  • TheDream18
    Participant

    @oanhtran1804

    Hello,

    I used this code for clear Topic info. To show topic is not supported yet, only creater topic voices in current. I checked code was correct, but it did not work, anyone can help please?

    function none_people_discuss() {
    $voice_count = bbp_get_topic_voice_count();

    if ( $voice_count = 1 )
    echo ‘<span class=”no_support”>[No support]</span>’;
    }

    add_action( ‘bbp_theme_before_topic_title’, ‘ none_people_discuss’ );

Viewing 4 replies - 1 through 4 (of 4 total)

  • Robin W
    Moderator

    @robin-w

    that code should put [no_support] before the topic title – is this what you are trying to achieve?


    Robin W
    Moderator

    @robin-w

    the code for if… needs two = signs so try

    function none_people_discuss() {
    $voice_count = bbp_get_topic_voice_count(); 
    if ( $voice_count == 1 )
    echo '<span class=”no_support”>[No support]</span>';
    }
    add_action( 'bbp_theme_before_topic_title', 'none_people_discuss' );

    TheDream18
    Participant

    @oanhtran1804

    Yes. I used this code as topic that i did not get any support, only there alone topic active. If count voice =1 , will display [No support] to user know that noone in help theme issued yet.


    TheDream18
    Participant

    @oanhtran1804

    Thanks Robin, Code worked

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