Support » Plugins » Hacks » Split Plugin code on multiple pages

  • I’m developing a little plugin and i want to split the code in multiple pages.
    At the moment i have only one PHP file in my plugin’s folder.
    I need to split the plugin like i can do when i develop a wordpress template.

    I need something like this:
    – my plugin folder
    ->my-plugin-main-file.php
    ->my-plugin-single-item.php

    How can i define this?

    Sorry for my english and thank you for helping me.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    All your plugin files must be linked together with include or require or similar clauses so that when WP loads your main plugin file, PHP can find all the other files by references in these clauses. Such clauses can be all in the main file or chained together by a reference in each file in turn, or some combination that fits the logical hierarchy of your file structure.

Viewing 1 replies (of 1 total)
  • The topic ‘Split Plugin code on multiple pages’ is closed to new replies.