Working with custom routes in wp-mvc plugin
-
Hi there,
I’ve been trying to develop large scale application in wordpress. Been through several plugin development best practices. And finally I’ve been reading the documentation of https://wpmvc.org/I pretty much understood its automatic (mvc) code generation tools. Its default controller functions index() & show() works pretty well.
But, when I tried to add a custom_action(), thats where I got stuck.
class DemoController extends MvcPublicController { public function hello(){ print_r($this->params); die(); } }
above function hello() is only accessible by below URL:
domain.com/demo/hello/{num}
but can’t be accessed via:
domain.com/demo/hello
Do I need to write any custom route to make this work? Or, am I doing anything wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Working with custom routes in wp-mvc plugin’ is closed to new replies.