PHP code example of andersonmadeira / multiple-featured-images

1. Go to this page and download the library: Download andersonmadeira/multiple-featured-images 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/ */

    

andersonmadeira / multiple-featured-images example snippets


if ( class_exists('AMad_Multiple_Featured_Images') ) {
    $mfi = new AMad_Multiple_Featured_Images();
    $mfi->register_image(array('custom_image', 'Custom Image'));
    $mfi->run();
}

$mfi->get_image_url( $post_id, 'custom_image' );