voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

MultiPostThumbnails class does not seem to exist #141

Open KroniK907 opened 5 years ago

KroniK907 commented 5 years ago

In my theme's functions.php I have the following per the wiki:

if (class_exists('MultiPostThumbnails')) {
     new MultiPostThumbnails(
         array(
             'label' => __( 'Cover Image', '[nus]' ),
             'id' => 'cover-img',
             'post_type' => 'page'
         )
     );
}

This appears to work great since after saving the functions.php file, a new "Cover Image" section appears on the page editor.

However, in my code for the displaying the page, there is some issue with the MultiPostThumbnails class. A standard class_exists('MultiPostThumbnails') returns false for some reason.

I have dug through the apache error_log and found no warnings or errors being thrown. Is there a namespacing issue or something that could cause this? I can't figure out why it wont work on the page display end.