• Resolved umair.razzaq

    (@umairrazzaq-1)


    Hi, I want to show frequently pros questions based on user input on helpful e.g faqs. Is there any way that I can do this? I can also add custom loop if you can provide it.

    Thanks
    Umair

    • This topic was modified 3 years, 8 months ago by umair.razzaq.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pixelbart

    (@pixelbart)

    @umairrazzaq-1

    Thanks for your feedback!

    I just ran an update. You can now use two functions in PHP that will give you the necessary content in an array. This function is also used by the widget in the dashboard. Maybe this will help you.

    5 most helpful posts from post type post
    helpful_get_most_helpful(5, 'post');

    5 least helpful posts from post type post
    helpful_get_least_helpful(5, 'post');

    https://github.com/pixelbart/helpful/releases/tag/4.4.37

    Thread Starter umair.razzaq

    (@umairrazzaq-1)

    Hi @pixelbart

    Thanks, the “helpful_get_most_helpful()” works for me. As it gives me the POST IDs in object that I can extract and do custom loop.

    Plugin Author Pixelbart

    (@pixelbart)

    @umairrazzaq-1

    Perfect. Here’s a little WordPress tip to save you another loop one there:

    $ids = wp_list_pluck(helpful_get_most_helpful(5, 'post'), 'ID');

    • This reply was modified 3 years, 8 months ago by Pixelbart.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show posts based on top pros (yes)’ is closed to new replies.