Last active
December 6, 2022 16:15
-
-
Save johnstonphilip/6ce2e02e071d6fb3c1b10dc64555b379 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('SHORTINIT', true); | |
require 'wp-load.php'; | |
global $wpdb; | |
$post_id_to_get = 2; | |
$result = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id_to_get ) ); | |
echo json_encode( $result ); | |
die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment