1

I'm looking for a way to create controllers in Wordpress (WP does not utilize this concept as far as I know)

By controller I understand whole system that retrieves posts.
Example things I need to do:

Create custom url /fetchEntries that will call fetch-entries.php file directly (for ajax calls)

Create custom url /places that will allow me to write own template that will be directly called (normally index.php is called).

What I aim for?
As far as I know to create controller I need to:
- Create page (Admin > Pages) - Obtain {Page_ID} - Create custom template (page-{Page_ID}.php).

Fragile part of this approach (at last for me) is that someone may press "remove" on that page and destroy whole controller.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.