Tag archive for "query"
I have an abstract base class that is used by various other models. The problem is that I need the same method that runs a query on all instances of those models, and that the manager isn't accessible via model instances. This is the code I ended up using. more
Run the filter whenever you want your post type in the main loop. Add ishome(), iscategory() etc. Example is for the post type 'paste'. more