Support » Plugins and Hacks » Code help for new plugin

  • I’m working on a new plugin, but keep running into an issue of not having access to the database. I have a second file which also needs access to the database – in order for this plugin to work this file needs to be standalone. What files do I need to include to get access to the query fuctions?

Viewing 1 replies (of 1 total)
  • By including the wp-config.php file, you can access the database using WP’s built-in query functionality (i.e. $wpdb->get_results(), etc.). Just about all the internal functions, classes and so on should be made available this way.

Viewing 1 replies (of 1 total)
  • The topic ‘Code help for new plugin’ is closed to new replies.