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
- WooCommerce – Call to undefined function is_woocommerce()
- Custom values are not translated
- Change the name of an installed plugin
- Issue with post request to admin-post.php
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- like to keep reading plugin
- Check if email address exists front end with AJAX in a plugin
- How to add class in plugin only for network site?
- Plugin Development sqlite or WordPress’ database
- WordPress plugin for activating other plugins
- Fetch Children of Grouped Products Inside WooCommerce Product Loop
- Contributive page where people logged in can write
- Contact Form 7 Get Image Function [closed]
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- how to do login using woocommerce rest api From android
- How to create a custom shortcode based on the layout?
- WP-DownloadManager – Query most download per week/month etc
- How to test ‘upgrader_process_complete’ hook in plugin development?
- Plugins ignored a line breaks or tag in the WordPress comment functions
- How to get path or root of plugin folder, not file or dir?
- What is the easiest way to rename a plugin (and also avoid plugin updates)
- Correct Plugin File Path
- strange shortcode error: does shortcodes requires any dependency?
- Create “new pages” within the admin section of plugin
- Creating a plugin that will display text on every page
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- WordPress cron job running more than once
- How to Add text value in Automatically in this conditions?
- How to access a wordpress plugin page or add posts without doing it from the WordPress dashboard?
- Critical Error message of WordPress adming
- Update wordpress user roles not working as excepted
- Create new page in wordpress plugin which doesn’t exist
- Use WordPress Plugin without WP head
- Can’t access 3rd party API, code works on local server but not on wordpress
- Fatal error when activating my custom wordpress plugin
- Front End Page Not Loading Header Footer
- Media Upload to custom database and Custom Directory
- TinyMCE how to add css when inputing a text
- Can plugin automatically update if i hide the update notification?
- I created a custom form in HTML/CSS and now I need it to submit … should I create custom PHP or is there a plugin I can use?
- Apache rewrite rules and wordpress problem
- How wordpress plugin hooks works? [duplicate]
- Post curl function save twice using plugin hook function wordpress
- Plugin: Custom menu item problem
- Getting warning of Missing argument 2 for wpdb::prepare()
- How do I set register_meta for a specific CPT?
- How to Enfroce Domain Licensing Limits? [closed]
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Update Content for a Custom Block Toolbar Button
- Submitting form to admin-post.php WordPress
- WordPress Throwing Deprecated Errors on its own Files