Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress custom php use wp query

if ( ! defined('ABSPATH') ) {
    /** Set up WordPress environment */
    require_once( dirname( __FILE__ ) . '/wp-load.php' );
}

global $wpdb;
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT );
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #wordpress #custom #php #wp #query
ADD COMMENT
Topic
Name
4+2 =