Skip to:
Content

bbPress.org

Opened 13 years ago

Closed 11 years ago

#1666 closed enhancement (wontfix)

Add ability to remove the breadcrumbs when using shortcodes

Reported by: anointed's profile anointed Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: API - Shortcodes Keywords: 2nd-opinion
Cc: stephen@…, wordpress@…

Description

Looking at the display_topic_index() function, I notice that it inserts the breadcrumbs with no ability for me to manually remove it via calling the shortcode. This is happening on all relevant shortcodes.

Please consider adding an option for us to remove the breadcrumbs via the shortcode parameters.

*I manually use breadcrumbs in another location and because there is no dedicated topic loop that I can call (can't find one), I have to use the shortcode for now to display recent topics on the homepage.

Change History (10)

#1 @ramiy
13 years ago

  • Keywords needs-patch 2nd-opinion added

Breadcrumbs is a feature set by the theme developer. Nevertheless, we can add a check box to bbpress admin screen to "show/hide" breadcrumbs. This way, even if the the theme developer added breadcrumbs, the theme user can hide it through the admin panel without editing the code and without using any shortcodes.

In the back-end, the "show/hide breadcrumbs" check box will use add_option()/update_option() to store the information in the database.

In the front-end, the bbp_get_breadcrumb() function will use get_option() to check whether to show breadcrumbs or not.

This way, we will maintain backward compatibility for all themes, and provide more control to theme users through the admin panel.

#2 @johnjamesjacoby
13 years ago

Not going to build theme options into bbPress core. You can subjectively filter the bread crumb to bail early if you want to, or don't include it in your custom theme at all.

#3 @johnjamesjacoby
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#4 @anointed
13 years ago

I actually agree with not having a theme option as it does not make sense. What I was more after is something like display_topic_index('breadcrumbs' => false).

I'm guessing that it is acceptable practice for people building custom themes to use display_topic_index().. If that is the case, then being able to apply attributes helps a lot for themes that don't need the breadcrumbs output. Otherwise I would need to completely rebuild the display_topic_index() function to not include them. Seems like overkill.

#5 @anointed
13 years ago

Here is a great reason why I was asking to have the option to filter out the breadcrumbs when using shortcodes.

http://awesomescreenshot.com/0c4njzz7c

Say I create a page and insert 2 shortcodes, 1 for forums, 1 for topics below forums. (standard way most forums look, having both forums and topics on front page)

I would then end up with 2 sets of breadcrumbs, even if using the default template.

Adding the ability to filter out the breadcrumbs when calling the 'bbp-topic-index' type of breadcrumbs solves the problem.

#6 @anointed
13 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

#7 @netweb
12 years ago

  • Cc stephen@… added

#8 @MZAWeb
12 years ago

  • Cc wordpress@… added

Maybe I'm missing something here, but this is extremely easy to solve in the theme side: https://gist.github.com/MZAWeb/5122874

I'm not sure I like the idea of adding a setting on bbPress for this. Seems to be completely a theme decision.

#9 @MZAWeb
11 years ago

  • Keywords needs-patch removed

#10 @netweb
11 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.