[Resolved] How to duplicate popular posts widget?

Home Forums Support [Resolved] How to duplicate popular posts widget?

Home Forums Support How to duplicate popular posts widget?

  • This topic has 3 replies, 2 voices, and was last updated 1 year ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2566003
    Anonymous

    Hello,

    I am opening this topic for a continuation from my previous topic “https://generatepress.com/forums/topic/how-to-create-a-popular-posts-widget/

    So, basically I would like to add same functionality that we created for “Most Read” widget to “Popular Reviews” so it only counts reviews and for “Useful Guides” where it would only count guides.

    How I can do this? Can I use same code and just filter query so it only shows results from a certain category or tag?

    Thanks for your time,

    Sara

    #2566506
    David
    Staff
    Customer Support

    Hi there,

    Can I use same code and just filter query so it only shows results from a certain category or tag?

    Yes. That code merges the custom_args with your query loop.
    So in the query loop you can add a parameter for the taxonomy.

    Should work ๐Ÿ™‚

    #2616754
    Anonymous

    Hello David,

    Sorry for the late reply, just wanted to let you know that worked perfectly ๐Ÿ™‚

    Thank you very much!

    Sara

    #2618319
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.