WordPress.org

Support

Support » Plugins and Hacks » Hacks » [Resolved] get_categories returns an empty array ..

[Resolved] get_categories returns an empty array ..

  • Hi all,
    I am stuck in a strange issue, when I hit this code on one of my WordPress installations for a user other than an Administrator get_categories("&parent=4")

    this code returns an empty array BUT when an administrator level user reaches this line of code it works as expected.

    Any clue to sort this out asap will be appreciated.
    TIA

Viewing 4 replies - 1 through 4 (of 4 total)
  • Are you using something like Wishlist Member to hide access to content?

    Yes I am using Wishlist Members to protect the contents BUT the pages I am trying on are not protected OR the user has access to that content – with a default role of Subscriber.

    As soon as I promote the user to an Administrator everything works just fine 🙁

    Note: I am using the “Post Tags and Categories for Pages” Plugin to have an option to link categories to the pages – need to have an hierarchical view for the Dashboard page which is linked with a certain level user.

    There are settings in the backend of WishList Member that auto-protect terms from even being returned from a query no matter what page they are queried from. I know it sounds unintuitive (and I think it is) but that’s the way WLM works. That is almost certainly your problem.

    @nickohrn, thank you very much for pointing me towards that Just worked out that I have to allow access to the relevant categories for different level in Wishlist Member’s back end.

    Thanks again for the help, I am done with it 🙂
    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] get_categories returns an empty array ..’ is closed to new replies.
Skip to toolbar