Use Repository Pattern in WP theme
In my template files I have a lot of WP_Query to get posts of an author or from a specif category ecc… I’m thinking to use Repository Patter in order to have cleaner code and a layer between database and theme.
This PostRepository class will have some methods like:
Could be a good idea? Have somebody use somethink like this?