Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display curent forum in topic page

  • @marchocias

    Participant

    Hello,
    I would like to display the current forum on a topic page. How can I go about it?
    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • @robin-w

    Moderator

    the whole forum or just the title?

    above below?

    example please

    @marchocias

    Participant

    Ok, for example i have somes sub-forums like this :

    Principal Forum 1
    Sub Forum 1
    Topic 1
    Topic 2
    Sub Forum 2

    Principal Forum 2
    Sub Forum 1
    etc,…

    When i am on page Topic 1, i whish to display the title of Sub Forum 1

    @robin-w

    Moderator

    is your site not displaying breadcrumbs?

    @marchocias

    Participant

    @robin-w

    Moderator

    your theme is hiding the bbpress breadcrumbs in

    https://renaloo.com/wp-content/themes/digiqole-child/assets/css/custom.css line 2281

    This function will add a reference to the breadcrumb

    add_action ('bbp_template_before_single_topic' , 'rew_forum') ;
    
    function rew_forum () {
    	echo '<div class="rew_forum">' ;
    	$topic_id = bbp_get_reply_topic_id() ;
    	$forum_id = bbp_get_topic_forum_id() ;
    	echo '<a href="' . esc_url( bbp_get_forum_permalink( $forum_id ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $forum_id ).'</a>' ;
    	echo '</div>' ;
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    @robin-w

    Moderator

    or you could just display the bbpress breadcrumb by by changing the css file, or putting this in the custom css

    .bbp-breadcrumb {
    	display: block !important;
    	padding-top: 20px;
    }

    @marchocias

    Participant

    Ok thank you for your help

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