I would like to build a plugin for WordPress that allows me to specify a /path and returns (renders) some PHP code when being accessed.

Usecase Example: This plugin would be able to set a special URL for displaying PHP info. When accessing localhost/phpinfo it would render an phpinfo.php file located inside the plugin directory structure.

I appreciate it!

Read more here: Plugin that displays custom HTML to a specific subpath


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: