1. Home
  2. Docs
  3. Simpods MVC
  4. Tutorials
  5. MVC Structure
  6. A quick example

A quick example

This example shows the basics of how data is retrieved from a model and passed to the view via the controller, where is is displayed in the WordPress Loop before the post content.

Model

Filename

mvc/models/mvc_front_demo.class.php

Code

Copy to Clipboard

View

Filename

templates/template-demo.php

Code

Copy to Clipboard

Controller

Filename

mvc/control/templates/template-demo.php

Code

Copy to Clipboard