Skip to:
Content
Pages
Categories
Search
Top
Bottom

Stickying topic in private forum moves topic to a public forum


  • ewd910
    Participant

    @ewd910

    Hi, this is a bit of an odd problem, but a forum admin stickied a post in a private forum (clicking “sticky” in the top right, not from wp-admin) and it moved the topic to an unrelated public forum, which is a problem of course because the topic was meant to be private. Sounds like a bug in bbpress, has anyone else come across this?

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

  • Robin W
    Moderator

    @robin-w

    I suspect that they made the topic ‘super sticky’ which means it appears on every forum.

    go to dashboard>topics and find ten topic and edit and check it’s type in the top right and under topic attributes


    ewd910
    Participant

    @ewd910

    Yes it looks like the default behavior is that the “sticky” link on the forum topic super stickies it, based on the super=1 query param I’m seeing. Any way to default it to 0, or do I have to make a custom topic template?


    Robin W
    Moderator

    @robin-w

    it is not very clear (I’m not a bbpress author), but the ‘stick (to front)’ is actually 2 links, if you click the ‘stick’ part it makes it sticky, if you click the ‘(to front)’ part it makes it super sticky.


    ewd910
    Participant

    @ewd910

    Ah I see, yeah I don’t like that at all, will probably remove it from my template. Thanks as always!


    ewd910
    Participant

    @ewd910

    What’s the correct way to override includes/topics/template.php? Seems I have to remove it from there


    Robin W
    Moderator

    @robin-w

    example for loop single repy:

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php

    transfer this to your pc and edit

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.php

    bbPress will now use this template instead of the original


    ewd910
    Participant

    @ewd910

    that works on files even outside of the templates directory? I already override some of the template loops but this seems like a different thing


    Robin W
    Moderator

    @robin-w

    Apologies, I didn’t spot that this was not a front end template.

    you would amend functions in that template by using filters. Which function do you wish to amend?


    ewd910
    Participant

    @ewd910

    add_filter('bbp_get_topic_stick_link',
        function ($link, $retval, $admin_links) {
            $splitLink = explode('a> <a', $link);
            $link = $splitLink[0] . 'a>';
            return $link;
        }, 10, 3
    );

    Here’s my solution in case anyone sees this


    Robin W
    Moderator

    @robin-w

    glad you are fixed and thanks for posting your solution 🙂

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