Skip to:
Content

bbPress.org

Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#2545 closed defect (fixed)

$wp_query->is_single and $wp_query->is_singular set to false on user templates

Reported by: Mat Lipe Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: Tools - Code Improvements Keywords: has-patch
Cc:

Description

When viewing a single user section as chosen by bbp_is_single_user_edit()
bbp_is_single_user(), the $wp_query->is_single and $wp_query->is_singular remains set to false. This does not affect the output generation of the bbpress however it affects theme's checks for is_singular() etc.

I noticed it on the Genesis theme in particular because it outputs the excerpt() when something is !is_singular()

Attachments (1)

theme-compat.php.patch (950 bytes) - added by Mat Lipe 6 years ago.
Patch showing quick fix

Download all attachments as: .zip

Change History (4)

@Mat Lipe
6 years ago

Patch showing quick fix

#1 @johnjamesjacoby
5 years ago

  • Milestone changed from Awaiting Review to 2.6

This makes sense. Thanks for the patch.

#2 @johnjamesjacoby
5 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 5470:

In bbp_theme_compat_reset_post() also set is_singular to value of is_single. Improves query compatibility with themes and other plugins. Props Mat Lipe. Fixes #2545.

#3 @johnjamesjacoby
3 years ago

In 6314:

Theme Compat: Revert part of r5470, causing user profiles to output comment sections.

Fixes #3050. See #2545.

Note: See TracTickets for help on using tickets.