Support » Fixing WordPress » Plugin using shortcode needing multiple folders

  • I’m working on a plugin which is pretty much one php file and a bunch of folders with other php files in them(they’re library files written by someone else and I’d like to avoid tampering with them as much as possible).

    The plugin is loaded via shortcode into pages and posts and it needs to include a php file from one of the folders. That works just fine. Problem is that the file also needs to include some files from the folders which in turn do the same, and somewhere along the way the paths get messed up and the whole thing stops working.

    So my question is, how can I make sure the paths don’t get messed up?

Viewing 1 replies (of 1 total)
  • I suggest spending some time at php.net reading up on require and include and how they handle relative paths.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin using shortcode needing multiple folders’ is closed to new replies.