Skip to:
Content
Pages
Categories
Search
Top
Bottom

php actions; Authors and Topics


  • eVersatile
    Participant

    @eversatile

    Hello,
    Is there a action to show another php action to only the author of the topic?
    For example, if the author was looking at the topic he would see some text and if someone else was looking at it they would either see nothing or some other text.
    Also, is there a action to detect if a topic is open or closed?
    For example, If the topic is closed then another function would appear and if it is open then that action would not appear or something else would.

    If you are not following what I am referring to then it would be the bbpress directory files. bbPress > content-single-topic.php

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

  • eVersatile
    Participant

    @eversatile

    So I was able to find a solution to my second issue by using <?php elseif ( bbp_is_topic_closed() ) : ?> to detect if the topic is closed or not.
    I am still having problems with the first one. Trying to only show content to the author of the topic. I have tried <?php elseif ( get_topic_author() ) : ?> and <?php elseif ( current_user_can() ) : ?> nothing has worked for me yet. Any ideas?


    Robkk
    Moderator

    @robkk

    im not sure maybe you could use if bbp_reply_position = 1

    using <?php bbp_reply_position ?>

    then echo the content out for the topic author only

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