You need to include the “capability” to use $wpdb
in your page.
Include this in your page and see what happens.
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
include_once $path . '/wp-load.php';
Related Posts:
- How does WordPress handle MySQL row lock errors?
- Where should my plugin POST to?
- Plugin development: how to create a form and get custom data?
- shortcode doesn’t work
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- How to trigger $_GET request within admin plugin page?
- Custom form action to handle data inside a plugin
- wp_create_nonce function doesn’t work inside a plugin?
- New User Form – Custom Menu Page
- Help With MySQL to WPDB Query Conversion
- Creating mySQL procedure with $wpdb
- Using a custom plugin to capture input data via Ajax and PHP
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- WordPress plugin creation how to execute .sql in order to insert multiple rows at activation of plugin
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Insert data from .sql file in wordpress plugin
- WordPress Backend HA (Automatic failover)
- Checkbox conflict in my custom plugin admin page
- Submit Form data to another page via Ajax (WordPress Way)
- DB Query not working in Plugin
- Way to send multiple values for column to MySQL?
- WordPress plugin: efficient way to store large data
- Plugin generating unexpected output – on WP mysql dump import
- Select Form Element Not Saving from Plugin Options
- Can’t create tables with my plugin
- Integrating Custom Database with WordPress
- How to display results from a data table with an encrypted user id?
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- User loggedin as Subscriber form not sending
- How to get the custom field value using SQL query
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- WordPress UPDATE queries on MySQL database stuck
- submit form data to wordpress existing database table using my plugin
- get/show Last ID
- Resetting AUTO_INCREMENT primary key
- Re-writing MySQl query for execute faster
- Create Database Tables on Plugin Activation hook
- WP_Filesystem usage within a block of code
- Create plugin with form in post and submit it to specific form
- Capturing POST data
- Creating fields in the database
- Undefined variable _POST
- how to search through plugin in wordpress cimy-user-extra-fields?
- Get all the related data from WordPress DB
- How to display blog posts only authored by the administrator
- How can I delete the options from DB when the plugin is deleted?
- Display file contents within Plugin
- Trying to Find the PHP File/Function that Handles a Specific Form Action URL
- WP_Query does not return the result even if the data is present in the database
- Form submission issue in wordpress admin (custom plugin) using $_GET for searching & filtering
- WP Form Date Field – Remove Day option
- Updating wp_postmeta from meta_keys and meta_values from another table having price and sku only
- Bulk edit existing shortcode within custom field
- WordPress plugin – Error “Plugin generate 2890 characters of unexpected output when activated”
- Hook into and send mail using WP Mail SMTP type plugin from HTML static front page?
- React JSX in WordPress Plugin Development
- My plugin wants to update another plugin
- Redirecting to home page after login as custom role WordPress
- Add keywords meta to index.php page
- Where (or when) should I register a new taxonomy?
- Woocommerce plugin for minimum order and add-to-card-step
- Self deactivate plugins after an action occurs
- How to get current post user id
- UnInstallation of a Plugin from a developers perspective – The correct and clean method
- Issue with adding count to “subsubsub” aka quick links on custom_post_type
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- How to slice an array using posts_per_page? [closed]
- White page on custom plugin option submit
- Simple ajax call not working in wordpress plugin
- Plugin version is not showing up in wordpress.org plugin directory
- Do action only on certain front end pages?
- Display data on Word Press site posts and pages from mysql table
- Change plugin main file name (that is currently in the repo)
- Create dynamic page content from custom WordPress plugin page
- Plugin Options Not Saving to Database in WP 4.5
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- How to create ‘import dummy data’ option in custom wordpress plugin
- Call to a member function have_posts() on a non-object on normal loop
- JS Support Ticket – Auto create WP account
- WP Post Template – Templates in own folder
- Register Page Template from Plugin
- Private Plugin Updates – Localhost
- How to change custom post type pemalink Hierarcy
- Any hook for pre-plugin-update -either bulk or single plugin update
- Get plugin option in another PHP file
- Test files for plugin development
- Input with spaces in Shortcode attributes overwritten by defaults
- Unable to override pluggable function wp_mail
- Form isn’t inserting data into database with ajax plugin
- Avoid class name collision when using third party libraries in plugins?
- How to create custom tables in WordPress using my own plugin?
- Image upload and other options in the same plugin settings form?
- Own plugin corrups plugin-activation
- wordpress plugin is not activating from widget
- All Users > User List > Update User Meta Field Inline
- Checking instances of scripts in wp_head
- How to save post change url youtube link?
- Best approach to fetch data from wp options to js file or php file