Create a custom archive page for a custom post type in a plugin
What you need is hooking template_include filter and selectively load your template inside plugin. As a good practice, if you plan to distribute your plugin, you should check if archive-my_plugin_lesson.php (or maybe myplugin/archive-lesson.php) exists in theme, if not use the plugin version. In this way is easy for users replace the template via theme (or … Read more