• Resolved George

    (@giorgos93)


    Hi, Héctor!

    I have 1 more question: is it possible to put in sidebar different lists of popular posts? What I mean is: I have different categories on my website and I want to have a list of popular quizzes on my website and to turn it on only in all quizzes in “Quizzes” category. And I want to have other popular posts lists in other categories (articles etc).

    So my question is: is it possible to make different popular posts lists for certain categories that will be shown only in this categories and will include only posts from this categories and exclude others?

    Popular quizzes in “Quiz” category, popular posts about writers in “Writers” category etc.

    I hope I explained it well ?? Thanks in advance for an answer!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @giorgos93,

    Yes, you can have several Popular Posts widgets on your sidebars, each with their own settings and all.

    To learn how to display popular posts by category please check this FAQ: What is “Taxonomy” for?

    Thread Starter George

    (@giorgos93)

    Hi, Hector!

    Sorry for late reply, but I’ve just decided to implement this function, that I wrote about in this topic.

    So I read your FAQ “What is Taxonomy for”, but I guess that’s not what I want. From what I understand, this option allows to show popular posts from certain categories, and to exclude certain categories IN GENERAL. But I use “Popular Posts” widget in my sidebar for ALL posts, so I can’t exclude certain categories there.

    Can I somehow show popular posts from different categories on posts from the EXACT SAME categories? For example, on “Quizzes” category show only popular quizzes. On “Websites for writers” category show only posts with popular websites for writers, etc?

    Or I didn’t understand well, what you meant?

    Thanks in advance!

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @giorgos93,

    Yeah, I could have been a bit more specific. I was probably tired or something when I wrote my previous reply haha.

    The short answer is no, the widget can’t automatically detect the current category.

    What I tried to say with my previous comment was “what you can do is set up a WPP widget for each category and then somehow show one or the other depending on the current category” but that might not be practical if your site has a lot of categories.

    Alternatively you could also use the wpp_get_mostpopular() template tag, obtain the current category ID via PHP, then pass it to the function so it renders popular posts under said category.

    Thread Starter George

    (@giorgos93)

    Thanks for the answer!

    I guess, that this alternative method is too hard for me to implement ??

    But I hope, that you will consider adding an option “to show popular posts only from the same category” in future plugin releases!

    Thread Starter George

    (@giorgos93)

    And since I wrote to you, can I ask something else?

    I have a rule in my robots.txt, that disallows for search robots to enter every folder that has “wp-” in it’s name.

    So I’ve just checked in Google Search Console one of my posts, and saw, that robots.txt blocks an access to 2 of your plugin’s files:

    1 — /wp-json/wordpress-popular-posts/v1/popular-posts

    2 — /wp-json/wordpress-popular-posts/v1/popular-posts/widget/3?is_single=346

    Do I need to add these files in exceptions, or they better to be blocked?

    Thanks in advance for an answer!

    Plugin Author Hector Cabrera

    (@hcabrera)

    The first one is what WPP uses to track views, and the second one is what renders the widget on your sidebar when the “Ajaxify widget” option is enabled.

    I guess that it’s OK to prevent bots from accessing the first one, after all you may not want their visits being tracked by WPP.

    The second one though I’m not so sure since it returns content. Googlebot, Google’s search engine, might crawl it to find your popular posts. I suppose it should be fine as Google can still find these posts in other areas of your website.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to make several lists of popular posts?’ is closed to new replies.