Skip to content

MultiPostThumbnails class does not seem to exist #141

@KroniK907

Description

@KroniK907

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions