Skip to main content
wpcrux.com

Back to all posts

How to Override Model Properties And Methods In October CMS?

Published on
8 min read
How to Override Model Properties And Methods In October CMS? image

Best October CMS Overrides to Buy in September 2025

+
ONE MORE?

In October CMS, you can override model properties and methods by extending the model class and creating your own custom model. Here's how you can do it:

  1. First, create a new PHP file for your custom model, let's say CustomModel.php, in the models directory of your plugin or theme.
  2. Inside the CustomModel.php file, the first thing you need to do is declare a namespace and import the original model that you want to override. For example, if you want to override the User model, your file may look like this: