PHP code example of tatter / wordpress
1. Go to this page and download the library: Download tatter/wordpress 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/ */
tatter / wordpress example snippets
public $wordpress = [
'DBDriver' => 'Tatter\WordPress\Database',
'WPConfig' => '/path/to/wp-config.php',
];
// Get a particular Post
$post = model('Tatter\WordPress\Models\PostModel')->find($postId);
// Access post metadata
echo $post->meta->_wp_page_template; // 'default'
// Update post metadata
$post->meta->_wp_page_template = 'mobile';