• Resolved LeeID23

    (@leeid23)


    I have enabled categories for pages and need to list popular pages within specific categories on several different sidebars across an intranet site i am currenlty working on e.g. most popular HR policies, most popular IT requests and solutions etc etc..

    The plugin works great for posts in categories (I’m using it for popular news stories within specific categories) but doesn’t seem to work for pages; it lists from all categories (and also from a custom taxonomy!). I am assuming this is because pages do not support categories by default. Is there a way to get this to work please? Plugin is brilliant otherwise ?? Thanks!

    https://www.ads-software.com/plugins/wordpress-popular-posts/

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

    (@hcabrera)

    Hi there!

    Since stock WordPress doesn’t offer built-in taxonomy support for pages, WPP purposely disables the category filter when the post type is set to page.

    There’s a way, however, to enable category filtering for pages:

    1. Go to Plugins > Editor and select WordPress Popular Posts from the dropdown.
    2. Find this line (as of WPP v.3.3.0) and set $join_cats to true (eg. $join_cats = true;).
    3. Hit the Update file button to save changes.

    Keep in mind that changing plugin’s code isn’t recommended because the next time you update it WordPress will replace all of its files with the new ones, overwriting all modifications. You should bookmark this topic for future references.

    Thread Starter LeeID23

    (@leeid23)

    Excellent – works like a charm ??

    Thanks for the super quick response!

    Plugin Author Hector Cabrera

    (@hcabrera)

    Don’t mention it ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Popular pages within category not working’ is closed to new replies.