PHP code example of varunsridharan / wp-post
1. Go to this page and download the library: Download varunsridharan/wp-post 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/ */
varunsridharan / wp-post example snippets
$post_data = new \Varunsridharan\WordPress\Post(22);
echo $post_data->title();
if($post_data->has_featured_image()){
echo '<img src="'.$post_data->featured_image_url('large').'"/>';
}