Daniel Lemes (@daniel_iceman)

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • @daniel_iceman

    Participant

    Edit: sorry, i’ve noticed my mistake since use the title was what Rackmire wanted. I need the inverse: use the parent forum title as class. I’m using a custom page template (forum.php).

    @daniel_iceman

    Participant

    Sorry, this functions seems to return the topic title, not the forum title. I have ‘googled’ around and got this:

    $forum_object = get_queried_object();
    $forum_id = $forum_object->forum_id; // get the forum id, is it right?
    $forum_title = get_forum_name( $topic->forum_id ); // get forum title by id
    $forum_class = sanitize_title_with_dashes($forum_title); //sanitize

    Not working since get_forum_name doesn’t work outside bbpress (inside WordPress header). Any other idea on how get the forum title (not the topic) and use as body class on WordPress? Thank you.

    @daniel_iceman

    Participant

    Anywhere in your theme (i put on a custom page template), use this:

    $wp_roles = new WP_Roles();
    $wp_roles->remove_role("bbp_role");

    …where “bbp_role” can be “bbp_keymaster”, “bbp_participant”, etc. This worked for me.

    https://codex.wordpress.org/Function_Reference/remove_role

    @daniel_iceman

    Participant

    At least i found how to remove this annoying roles.

    Anywhere in your theme (i put on a custom page template), use this:

    $wp_roles = new WP_Roles();
    $wp_roles->remove_role("bbp_role");

    It was the only way to remove bbp_keymaster and bbp_participant roles that keep appearing even after uninstall bbPress.

    @daniel_iceman

    Participant

    To get register date i’m using:

    echo 'Member since: '.date("Y/m/d", strtotime(get_userdata(bbp_get_reply_author_id())->user_registered));

    Still working to show post count, soon i’ll get it 😉

    @daniel_iceman

    Participant

    If there is anybody interested, i had the same problem with Origin. To solve, i edited the file breadcrumb-trail.php (bad idea, but i’m not using a child theme but a completely modified version of Origin). So, on line 450, we had before:

    /* Get the queried forum ID and its parent forum ID. */
    $forum_id = get_queried_object_id();
    $forum_parent_id = bbp_get_forum_parent( $forum_id );

    And now, working fine (exactly as John said here):

    /* Get the queried forum ID and its parent forum ID.  */
    $forum_id = get_queried_object_id();
    $forum_parent_id = bbp_get_forum_parent_id( $forum_id );

    Hope it helps.

    In reply to: Blank forum list

    @daniel_iceman

    Participant

    Sorry, php devoured, cleaning:

    `… get_template_part( ‘menu’, ‘primary’ ); // Loads the menu-primary.php template.
    hybrid_site_description();
    /** STOPS HERE **/
    do_atomic( ‘header’ ); // origin_header
    do_atomic( ‘close_header’ ); // origin_close_header …`

    @daniel_iceman

    Participant

    @enlightentogether
    Easy: create a new page, name it anything and paste the shortcode [bbp-forum-index] on it.

    I did the same and it works, but there is a problem: the link to forum “main page” on breadcrumbs still pointing the blank “original” one. I noticed that you’re using Oxygen theme from AlienWP; i’m using Origin (same developer) and have the same problem. Unfortunately they don’t give support for these free themes (except we buy an Membership for 39 bucks…)

    @daniel_iceman

    Participant

    I have the very same issue and to make it clear: i’m using Origin theme too, and the breadcrumbs on topic page have a link to forums list (works fine) and to forum which those topic belongs (don’t work).

    Even creating a blank page with the shortcode [bbp-topic-index], how to use same slug (WordPress automatically puts a number 2 in the end)?

    Forums list (working fine) http://www.memoriabit.com.br/forums/
    Forum (not working) http://www.memoriabit.com.br/forums/forum/sega-mega-drive-genesis
    Topic (working fine) http://www.memoriabit.com.br/forums/topic/super-monaco-gp/

    Thanks in advance.

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