Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiPostThumbnails class does not seem to exist #141

Open
KroniK907 opened this issue Jul 29, 2019 · 0 comments
Open

MultiPostThumbnails class does not seem to exist #141

KroniK907 opened this issue Jul 29, 2019 · 0 comments

Comments

@KroniK907
Copy link

KroniK907 commented Jul 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant