WordPress.org

Support

Support » Plugins and Hacks » get_posts() with category and order parameters

get_posts() with category and order parameters

  • I needed three of the unimplemented parameters for get_posts, and got a little impatient so I added code to support them. I didn’t see them in the latest alpha, and sorry if there is a plugin for this already. Anyway if anybody else wanted those parameters and is impatient like me, just replace the get_posts function in functions.php with the contents of the file below.

    http://foofy.aspyre.net/get_posts.txt

Viewing 1 replies (of 1 total)
  • http://www.dwelle.org/archives/2004/09/28/wordpress-image-display-page-get_posts-enhancement/

    Another version of the above. The only modifications I made were to remove the $tableposts and $tablepost2cat variables (since they are being deprecated in favour of $wpdb-> and to add the update_post_caches($posts); line just ahead of the return call.

    I also named it get_posts2 so that I wouldn’t need to mess with the existing get_posts routine at all, just in case the devs decide to finish writing the thing before release. My templates just call get_posts2 now instead 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘get_posts() with category and order parameters’ is closed to new replies.