Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress Popular Posts section thru Facebook comment count

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35970
    vnvillar
    Participant

    Hi guys,

    I’m trying to display a popular posts list on my sidebar. I wanted to have a popular posts list having the most Facebook comments count. Here’s my current code that I have right now but it seems working correctly, is there anything I need to change?


    $pc = new WP_Query('orderby=comment_count&posts_per_page=5'); ?>

    have_posts()) : $pc->the_post(); ?>

  • " title="">

    Comments

  • Thanks in advance! :)

    Val

#94094
vnvillar
Participant

Any ideas guys? :)

#112229
rainemaida
Member

What’s not working?

Also don’t forget to use wp_reset_postdata(); after the endwhile;

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.