PHP code example of whitespace-se / wordpress-plugin-gatsby
1. Go to this page and download the library: Download whitespace-se/wordpress-plugin-gatsby library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
whitespace-se / wordpress-plugin-gatsby example snippets
define("GATSBY_PREVIEW_ENDPOINT", "https://example.com/wp-preview");
define("GATSBY_REFRESH_ENDPOINTS", "http://localhost:8000/__refresh");
graphql
query PreviewQuery($id: ID!) {
wp {
contentNode(id: $id, asPreview: true) {
# ...
}
}
}