Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to make Post layout look like it does on bbpress.org


  • thebeeobee
    Participant

    @thebeeobee

    Hi,

    Installing/customizing bbpress today, and I would love to make it look like it does here.

    A post at the top with its own appearance showing that it is the main post.

    Then:

    Viewing 5 replies – 1 through 5 (of 5 total)

    And then the replies which are obvious replies.

    I’m sure this has been covered on here (or other places) before, I just don’t know exactly what to search.

    Thank you for any help / ideas.

    Bobby

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

  • thebeeobee
    Participant

    @thebeeobee

    Hello,

    Just bumping this up. Would love any guidance no how to approach this.

    Thanks for any help and direction.

    Bobby


    thebeeobee
    Participant

    @thebeeobee

    Ok, found this… still digging…

    bbp_show_lead_topic


    Robin W
    Moderator

    @robin-w


    mrenkema
    Participant

    @mrenkema

    Same question here. I am not a WordPress engineer. Will discuss this info with my friend, who is.

    Thanks, Marten


    thebeeobee
    Participant

    @thebeeobee

    Thank you @robin-w! So the function I linked to activated the feature, and then I was able to copy the content-single-topic-lead.php into a bbpress folder in my theme, and edit it a bit like in your link. Feeling good about it.

    I do have a question though, if anyone can help me figure this out (i’m new to php and am not familiar with the syntax). In the file https://meta.trac.wordpress.org/browser/sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-single-topic.php , on line 73, what this mean:

    `<?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?>’

    That’s one of the few places I see the function called at all in the templates they edited. Still digging and learning. Thanks for any help or ideas.


    Robin W
    Moderator

    @robin-w

    this is a conditional statement

    basically it has 3 parts

    test
    ?
    true
    :
    false

    each in this case is a function

    so the test is bbp_show_lead_topic() – This will return false by default, but if you set it using a filter, then it would be true

    if this returns true then the ‘?’ function is executed which will show the reply count (just the number of replies)

    if false then the ‘:’ statement is executed which shows then post count (the count of topic + replies ie replies +1)

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