Hey guys I have a plugin and its displaying info on /courses.php (using theme)
How can I get it to display info on /courses/single_course.php
I figured I’d just have to make a /courses/ folder in theme and have single_course.php inside that. However this doesn’t seem to work.
I’ve tried googling but I’m struggling to figure out the keywords to solve this problem! ^_^
OK edit cause nobody is understanding:
- I have plugin working. This is a custom plugin
- I want to know how to make the following work http://www.example.com/plugin/index.php http://www.example.com/plugin/index.php
- Currently to make http://www.example.com/plugin work you just need to create plugin.php in the theme directory and give a callback to a function in the plugin.
- Creating /wp-content/theme/themename/plugin/index.php did not work as anticipated.
WP uses specific directories for placing its themes and plugins tom maintain organization standards.
or you can use the built in functions in wordpress
I would recommend keeping plugins in plugins and themes in themes. What you may be looking for is creating some extra plugin features which will require you to include you extra php functions and classes when the plugin in question is loaded.
First create a folder in under your plugin directory and chmod it with proper web securities
Next either copy or create and edit the new single_courses.php file. I’ve listed a quick method below if you are creating the new file from scratch. Otherwise just cp it over. In both cases we need to insure proper web access right using chmod.
Now we need to be sure to include the new file in our main plugin file
Thats the basic way to go about it. Use the same process for hooking theme php files as well. Always make sure when creating directories and files on your server that proper security is put into effect or you open up your web directory and or server to get hacked.
Hope it helps…