[buddypress-trac] [BuddyPress] #4981: Regenarate url's in Rel Next/Prev According buddypress pages

buddypress-trac noreply at wordpress.org
Sat May 18 13:49:50 UTC 2013


#4981: Regenarate url's in Rel Next/Prev According buddypress pages
----------------------------+------------------
 Reporter:  megainfo        |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  1.8
Component:  All Components  |     Version:  1.7
 Severity:  minor           |  Resolution:
 Keywords:                  |
----------------------------+------------------

Comment (by megainfo):

 Hi @boonebgorges, @r-a-y

 Im agree with you @boonebgorges to remove these prev / next links when on
 a BuddyPress page. By adding this code somewhere in buddypress core.

 {{{
 function _bp_maybe_remove_adjacent_posts_rel_link_wp_head() {
   if ( ! bp_is_blog_page() && ! is_404() ) {
         remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
         add_action( 'bp_head', 'bp_adjacent_rel_link_wp_head' , 1);
   }
 }
 add_action( 'wp_head', '_bp_maybe_remove_adjacent_posts_rel_link_wp_head'
 , 1 );

 }}}

 But I suggest adding rel="next" and rel="prev" in pagination in all
 buddypress components (members, groups, activity, messages,...etc).

 Check this video that talk about SEO and Pagination :
 http://www.youtube.com/watch?d&v=njn8uXTWiGg


 This can be done by adding a filter to paginate_links wp function :

 {{{
 add_filter('paginate_links', 'bp_add_rel_next_prev_paginate_links',10 , 1
 );
 function bp_add_rel_next_prev_paginate_links( $pag_links ) {
         $pag_links = str_replace( '<a class="prev ', '<a rel="prev"
 class="prev ', $pag_links );
         $pag_links = str_replace( '<a class="next ', '<a rel="next"
 class="next ', $pag_links );

         return $pag_links;
 }
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4981#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list