Advertisement
moraleida

Como usar comentários do Facebook junto com os do WordPress

May 10th, 2013
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1. <?php
  2. /**
  3. * Arquivo comments.php, baseado no tema Toolbox 0.1
  4. * para funcionar o popup inclua também comments_popup_script(400,500); antes da função wp_head() no header.php
  5. * para funcionar os comments do Facebook, inclua também a Javascript SDK
  6. */
  7. ?>
  8.     <div id="comments">
  9.            
  10.     <?php if ( post_password_required() ) : ?>
  11.         <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'toolbox' ); ?></p>
  12.     </div><!-- #comments -->
  13.     <?php return; endif; ?>
  14.        
  15.         <div class="fb-comments" data-href="<?php echo get_permalink(); ?>" data-num-posts="5" data-width="505"></div>
  16.        
  17.         <div class="commentlist">
  18.             <?php
  19.             wp_list_comments(
  20.                 array (
  21.                     'type'     => 'comment',
  22.             'style'    => 'div'
  23.                 )
  24.             );
  25.             ?></div>
  26.  
  27.         <?php if (comments_open()) : ?>
  28.         <?php comments_popup_link( 'Não usa Facebook? Comente aqui!', '1 comentário - Não usa Facebook? Comente aqui!', '% comentários - Não usa Facebook? Comente aqui!', 'comments-link', 'Comments are off for this post'); ?>
  29.         <?php endif; ?>
  30. </div><!-- #comments -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement