Rareloop / lumberjack

Lumberjack is a powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code.
https://lumberjack.rareloop.com
MIT License
377 stars 34 forks source link

posts function should set correct postType? #6

Closed jmp909 closed 6 years ago

jmp909 commented 7 years ago

Hi,

I'm wondering why you don't set the postType like this when calling posts, the same way you do with query? did i miss something. It didn't seem to work properly for me without it.


public static function posts($args = null) {
    // set the correct post type
    $args = array_merge($args, ['post_type' => static::$postType]);

    return Timber::get_posts($args, get_called_class());
}

thanks
J