Created
July 12, 2017 08:14
-
-
Save anthonybudd/1c336f3efb424d197f25cd55d49589b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Class Event extends WP_Model{ | |
| public $postType = 'event'; | |
| public $attributes = [ | |
| 'start_date', | |
| ]; | |
| public function _finderArchive($args){ | |
| $args = array_merge([ | |
| 'page' => 1, | |
| ], $args); | |
| return [ | |
| 'paged' => $args['page'], | |
| 'posts_per_page' => '5', | |
| ]; | |
| } | |
| } | |
| $events = Event::finder('archive', [ | |
| 'page' => 1, | |
| ]); | |
| dd($products); // [Event, Event, Event]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment