How do I access my custom page type controller from the home page?
Permalink
I have created a page type controller which I hope you can help me with. The handle of the page type I am working with is called 'page'. All pages in question definitely use the page type 'page'.
I have created the controller under: controllers - page_types - page.php
I have named the class name 'PagePageTypeController'.
Under this I have a function named 'archive'
I am able to access this function via the URL on all pages but the home page. For example:
Success:
http://localhost:8888/sell-my-house-fast/blog/how-to-choose-an-esta...
Page not found:
http://localhost:8888/sell-my-house-fast/archive...
Interestingly, if I name the function view() it runs automatically as expected. but as soon as I name it something else and try to access it via a URL it fails.
What do you think? Any help would be appreciated.
Thanks,
Jon
I have created the controller under: controllers - page_types - page.php
I have named the class name 'PagePageTypeController'.
Under this I have a function named 'archive'
I am able to access this function via the URL on all pages but the home page. For example:
Success:
http://localhost:8888/sell-my-house-fast/blog/how-to-choose-an-esta...
Page not found:
http://localhost:8888/sell-my-house-fast/archive...
Interestingly, if I name the function view() it runs automatically as expected. but as soon as I name it something else and try to access it via a URL it fails.
What do you think? Any help would be appreciated.
Thanks,
Jon