Skip to content

Commit

Permalink
Order attachments by menu_order
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranmaher committed Sep 9, 2014
1 parent 5f471b3 commit 6406c79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public function author()
*/
public function attachments()
{
return $this->hasMany('Square1\Wordpressed\Attachment', 'post_parent');
return $this->hasMany('Square1\Wordpressed\Attachment', 'post_parent')
->orderBy('menu_order');
}

/**
Expand Down

0 comments on commit 6406c79

Please sign in to comment.