WordPress “get_posts()” function not working
-
Hello,
After about an hour searching on the internet to solutions to my problem, I’ve finally decided to ask for help here, hoping that someone would be able to help me with my problem. ??
It’s the first time I’m using the “get_posts()” function because I’m trying to get informations about the user’s orders from the database.
After passing the arguments I wanted to the function, it returned an empty array.
So what I’ve decided to do is to get rid of all the arguments and just call the method with an empty array to see if the problem came from the arguments I was passing to the function.But when calling the function with no arguments ( $request = get_posts( array() ); ) and dumping the result, I still had an empty array… with no message of error :\
Does somebody knows why that might happen ?
I am trying to call the function from a php file in a plugin (Tutor), so I really don’t know why it doesn’t want to return anything.
Also, I am using version 5.7.2 of WordPress, which is currently the last one.
Any piece of informations would be really appreciated ! Thanks in advance ??
The page I need help with: [log in to see the link]
- The topic ‘WordPress “get_posts()” function not working’ is closed to new replies.