jd-fb (@jd-fb)

Forum Replies Created

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

  • jd-fb
    Participant

    @jd-fb

    Thanks again, Robin!
    I’ve successfully used the code above to modify the templates. Woo!

    However, one question / comment:
    The code you’ve provided for bbp_show_lead_topic doesn’t seem to do anything for me.
    I’ve tried:

    function custom_bbp_show_lead_topic( $show_lead ) {
      $show_lead[] = 'false'; // The code as shown on https://codex.bbpress.org/bbp_show_lead_topic/
      $show_lead[] = false; // No quotation marks around 'false'
      $show_lead = false;   // no array [] used on $show_lead, no quotation;
      $show_lead = 'false'  // no array, with quotation
      return $show_lead;
    }

    And none of these seemed to change how the lead topic was displayed.
    But, I’ve figured out the templates and I’m getting the results I was hoping for.

    Thanks again.


    jd-fb
    Participant

    @jd-fb

    Thanks Robin. I previously played with bbp_show_lead_topic, and I couldn’t get it to work (which is why I posted my question above.) I guess I was missing step 2, which is the template.

    Question: Do the steps you describe change if I’m developing a plugin, instead of a theme? If I’m correct, the following code should help me (correct?)

    correct way to override bbpress templates


    jd-fb
    Participant

    @jd-fb

    Thanks for the reply… but I think looking at the theme files only confused me more. (Sorry!)

    I’ve taken a look at templates/loop-replies.php that’s built-into the plugin, which (if I understand correctly) is what is used when a user is viewing a topic’s page (in other words http://domain.com/forum/topic/awesomness/). I’m kind of confused as to how it works – near the bottom of this template, it calls another template using bbp_get_template_part( 'loop', 'single-reply' ); – and it does this whether it’s the topic’s content or a reply to the topic.

    So, I’m uncertain if I need to modify the WP_Query (or where), or if I should modify the template.


    jd-fb
    Participant

    @jd-fb

    I just noticed that this website, bbpress.org, does something similar to what I’m looking for. (Except, I’d remove the avatar and date.)

    So, how does that work? I noticed that this site’s theme is called BB’s Parent, but that doesn’t seem to be available to the public (so I can’t check its code 🙁 )


    jd-fb
    Participant

    @jd-fb

    I noticed that there is no space before the word “days” in your line here
    if ( $last_active < strtotime( '-' . $this->old_topic_age_setting() . 'days' ) ) :

    This means that it’ll result in “-1days”, and every example I’ve seen for strtotime() has a space before the word “days”, so ‘-1 days’.

    I haven’t used strtotime() a lot so I’m not totally sure, but that one space could make a difference.

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