Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get permalink of forums root?


  • MarcGuay
    Participant

    @marcguay

    Hi,

    Is it possible to get the permalink of the forums root without referencing the slug? If the forum root slug is changed in the settings, any reference in the theme to the default ‘forums’ would break.

    Thanks,
    Marc

Viewing 3 replies - 1 through 3 (of 3 total)
  • Can’t test here, but did you check echo bbp_form_option( '_bbp_forum_slug', 'forum', true ); ?


    MarcGuay
    Participant

    @marcguay

    Hi Pascal,

    Thanks for replying. It seems that the bbp_form_option() function is not available where I’m trying to get the value, but it’s basically a wrapper for get_option() so I can use that. Also, I was trying to grab the forum root slug, so the following has worked for me:

    home_url(get_option( '_bbp_root_slug', 'forums' ));

    Thanks for pointing me in the right direction.
    Salut,
    Marc


    eldaras
    Participant

    @eldaras

    Hi !

    Sorry for resurrecting this old post, but I had the same question and I was wondering if the *best* current implementation might be home_url(bbp_get_root_slug()); to link from anywhere in a wordpress multi lingual site.

    I also looked at the implementation of the breadcrumbs, as they include a link to the root of the forum, but it looked like the implementation only worked when the user is inside one of the forum pages (maybe it has a dependency to a global object?).

    Thanks!

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