[buddypress-trac] [BuddyPress] #5307: is_page() does not work on BP pages and class names are different

buddypress-trac noreply at wordpress.org
Thu Dec 19 13:41:52 UTC 2013


#5307: is_page() does not work on BP pages and class names are different
--------------------------+-----------------------------
 Reporter:  juggledad     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  1.9
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 1) create a page in WP called 'member'
 2) activate the theme twenty twelve
 3) edit the 'style.css' and add

 body.home-page, body.page {background-color: blue;}

 4) edit content-page.php and add the following before line 11 (the
 <article id=…)

 <?php echo 'is_page()='.is_page().'<br>'; ?>

 5) view the home page, you will see the background is blue
 6) view the page you will see the background is blue and you will see
 'is_page()=1'

 7) activate BuddyPress
 8) go to dashboard->settings->BuddyPress->pages set the Members Directore
 to the page 'member'
 9) view the home page - you will see the background is blue
 10) view the 'member' page - you will see the background is no longer blue
 and  and you will see 'is_page()=     '

 11) go to dashboard->settings->reading->Front page displays
 - select ' A static page (select below)' and set Front Page as 'member' -
 hit save
 12) 10) view the 'member' page - you will see the background is no longer
 blue and  and you will see 'is_page()=     '

 BP is changing the classes passed on pages and not setting the is_page()
 when viewing the pages it uses. This can cause issues with themes.

 This did not happen in version 1.7.1

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5307>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list