Get latest posts with relativ author, tags and categories with only 1 request
-
Hello everyone. I’m developing an application that read data from my WordPress.
At the moment I’m using directly WordPress functions: http://codex.wordpress.org/Function_Reference/
I’ll make an example. I want to load latest 15 posts with their relative author information, tags and categories.
So I have to call
get_posts that gives me informations about latest 15 posts and than for each of them I have to call get_userdata for author information, get_the_tags for tags and the function to get categories.
So in total I have 1 query to get 15 posts and 45(15×3) queries to get informations about posts.
Is there a way to create my own function that gives me with 1 query FULL informations about latest posts?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get latest posts with relativ author, tags and categories with only 1 request’ is closed to new replies.