Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to link to Topics, Replies, Subscriptions?


  • kstormstudio
    Participant

    @kstormstudio

    Im using the last bbPress version, and twenty-twenty theme. All fine!
    But I need to integrate bbpress with woocommerce in a custom woocommerce dashboard we made, so basically I have to link all bbpress profile links (Topic created, Replies, Engagement…) as Woocommerce Endpoints.

    All set up but the problem is the links not showng the correct user information but : “Oh Bother, no topics found here!”. Despite the user has created topics , followed or subscribed.

    This is the code I put for the Subscription Endpoint for instance:

    add_action( 'init', 'wpsh_subscriptions_endpoint' );
    function wpsh_subscriptions_endpoint() {
    	add_rewrite_endpoint( 'subscriptions', EP_ROOT | EP_PAGES );
    }
    add_action( 'woocommerce_account_subscriptions_endpoint', 'subscriptions_endpoint_content' );
    function subscriptions_endpoint_content() {
    	include get_theme_file_path( '/bbpress/templates/default/bbpress/user-subscriptions.php' );
    }

    so, any suggestions please? 🙂

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

  • kstormstudio
    Participant

    @kstormstudio

    code below of course inserted in functions.php.

    Any help please? Thank you so much


    Robin W
    Moderator

    @robin-w

    In had a quick look at the code above and the call

    include get_theme_file_path( '/bbpress/templates/default/bbpress/user-subscriptions.php' );

    is looking for that file in your theme, not the bbpress plugin.

    as a test, create a directory in your child theme called ‘woo-bbpress’ (it can be called anything) and put a copy of the user-subscriptions in there

    then replace then above with

    include get_theme_file_path( '/woo-bbpress/user-subscriptions.php' );

    and see if that improves


    kstormstudio
    Participant

    @kstormstudio

    Hi Robin and thanks for your reply.

    Unfortunately it doesn’t work. I’ve been trying using both the admin account and another normal user account. Even using the link to “topics created” it doesnt display the topics created by that user. Same for subscriptions.
    Using the standard bbPress profile instead everything working properly but of course, I need to have those links as woocommerce Endpoints

    do you have any idea about how to fix it please?


    Robin W
    Moderator

    @robin-w

    I suspect that as it is being called from outside bbpress the ‘bbpress dispayed user’ is not set, so it considers that to be blank, so doesn’t know who to display.

    It would probably take a few hours to work out how to achieve this, and probably admin and FTP access to your site, so beyond free help I’m afraid.


    kstormstudio
    Participant

    @kstormstudio

    I’m the admin and I have FTP access so no problem for this. I just need to call bbpress links from endpoints, nothing more than this.
    Because of course user can only have one profile page instead that 2 so just WooCommerce dashboard as a profile page.

    As you mention there is not parameter in the line code :
    /woo-bbpress/user-subscriptions.php

    I think the page requires some parameters isn’t it?


    Robin W
    Moderator

    @robin-w

    probably, as I say it would require time beyond free help here.


    kstormstudio
    Participant

    @kstormstudio

    ok so basically what can I do? Because now bbpress is installed and me and my colleague spent time in setting up.
    I’ve been trying every possible solution with php a well.

    Even copying the same bpress profile PHP produces the same result.

    Its annoying planning to unistall the plugin and take another one


    Robin W
    Moderator

    @robin-w

    sorry, I’m just a guy trying to help, I am not a bbpress author. Expecting every free plugin to work with every other plugin out of the box is a bit hopeful and swapping to another probably won’t help.

    I have spent my own time googling the woocommerce function to try and help you. Being annoyed totally understandable, but gets you no further forward 🙂

    If you would like me to try and help further, contact me via

    Contact me


    kstormstudio
    Participant

    @kstormstudio

    I do… and Robin… thank you very very very much! I appreciate your help but its since a week long that I’m struggling hard 🙁


    kstormstudio
    Participant

    @kstormstudio

    I sent you an email Robin


    Robin W
    Moderator

    @robin-w

    sorry, I cannot find your email


    kstormstudio
    Participant

    @kstormstudio

    sent it again 🙂 see an email from Max, K Storm Studio? from gmail account


    kstormstudio
    Participant

    @kstormstudio

    did you get it, Robin?


    Robin W
    Moderator

    @robin-w

    yes, sorry I’ve been out all day.

    I’ll email you back later 🙂


    kstormstudio
    Participant

    @kstormstudio

    absolutely, thank you very much Robin.
    Just waiting for your email 🙂

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