title: facebook like button and pagination implementation in wordpress
body: <p>I need advice, </p>
  
  <p>I've installed facebook/google+ on my wordpress category pages.</p>
  
  <p>For example: <a href="http://www.sandrophoto.com/category/famous-photographers/" rel="nofollow">http://www.sandrophoto.com/category/famous-photographers/</a></p>
  
  <p>First page has allot of likes, but second and third page only few. This pushed me to think, maybe I should unite those pages into one.</p>
  
  <p>And instead of having separate 'like button' for urls, I would point button only to first page.
  <a href="http://www.sandrophoto.com/category/famous-photographers/page/2/" rel="nofollow">http://www.sandrophoto.com/category/famous-photographers/page/2/</a>
  http://www.sandrophoto.com/category/famous-photographers/page/3/</p>
  
  <p>Does this make sense?</p>
  
  <p>Any ideas how to implement this? I use this currently:</p>
  
  <pre><code>//get current archives url for fb like and open graph
  function get_current_archive_link( $paged = true ) { 
          $link = false; 
  
          if ( is_front_page() ) { 
                  $link = home_url( '/' ); 
          } else if ( is_home() &amp;&amp; "page" == get_option('show_on_front') ) { 
                  $link = get_permalink( get_option( 'page_for_posts' ) ); 
          } else if ( is_tax() || is_tag() || is_category() ) { 
                  $term = get_queried_object(); 
                  $link = get_term_link( $term, $term-&gt;taxonomy ); 
          } else if ( is_post_type_archive() ) { 
                  $link = get_post_type_archive_link( get_post_type() ); 
          } else if ( is_author() ) { 
                  $link = get_author_posts_url( get_query_var('author'), get_query_var('author_name') ); 
          } else if ( is_archive() ) { 
                  if ( is_date() ) { 
                          if ( is_day() ) { 
                                  $link = get_day_link( get_query_var('year'), get_query_var('monthnum'), get_query_var('day') ); 
                          } else if ( is_month() ) { 
                                  $link = get_month_link( get_query_var('year'), get_query_var('monthnum') ); 
                          } else if ( is_year() ) { 
                                  $link = get_year_link( get_query_var('year') ); 
                          }                                                
                  } 
          } 
  
          if ( $paged &amp;&amp; $link &amp;&amp; get_query_var('paged') &gt; 1 ) { 
                  global $wp_rewrite; 
                  if ( !$wp_rewrite-&gt;using_permalinks() ) { 
                          $link = add_query_arg( 'paged', get_query_var('paged'), $link ); 
                  } else { 
                          $link = user_trailingslashit( trailingslashit( $link ) . trailingslashit( $wp_rewrite-&gt;pagination_base ) . get_query_var('paged'), 'archive' ); 
                  } 
          } 
          return $link; 
  }
  </code></pre>