WordPress.org

Ready to get started?Download WordPress

Forums

get_posts() with category and order parameters (2 posts)

  1. Foofy
    Member
    Posted 9 years ago #

    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

  2. RustIndy
    Member
    Posted 9 years ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.