Reference: http://codex.wordpress.org/Template_Tags/get_posts
It's returning 5 posts because that's the default for the WordPress function get_posts. To return all posts in the category, make line 62 in your paste look like this:
[php]
$posts = get_posts
("numberposts=-1&post_type=$post_type");
Change the -1 there to a specific number to get that number of posts returned. If you want 10 posts, change -1 to 10. If you want 17, change the -1 to 17.
On line 50, yes, you enter the field in your form you want to be populated with this function.
On line 51, the name of your custom post type is typically lowercase. If you look in the wp_posts table, the column "post_type" would have the values you can use. Can you look there to be sure you have the capitalization and spelling exact?
It's a complex customization, but once you have it done, it will be very nice. Keep at it.
Posted 13 years ago on Thursday October 27, 2011 |
Permalink