WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Post Thumbnails
[resolved] How do I Install this product? (5 posts)

  1. rodsimm
    Member
    Posted 1 year ago #

    Hi, I really have no idea where to put the installation code..
    Could you give some more details/examples?

    Having read the instructions, I have tried..

    • Copying the code block in stage 3 (as is), to the themes functions.php.

    Does this register a new thumbnail for the post type?
    Is this the correct thing to do?
    In the Edit Post page there is a secondary image selection displayed.

    But where do I put the code for section 4.. Display the thumbnail in your theme?

    I have absolutely no idea where this code should go...

    Also..

    • Multiple post thumbnails, does not appear in the Widgets page to drag/drop to a sidebar.
    • Media Gallery Size options Medium and Large are not selectable

    (No link available as working locally)

    http://wordpress.org/extend/plugins/multiple-post-thumbnails/

  2. bigfatty
    Member
    Posted 1 year ago #

    Adding to the above question:
    1. Where in the functions.php file should this code be added? At the top of the file, bottom, or does it matter?

    if (class_exists('MultiPostThumbnails')) {
            new MultiPostThumbnails(
                array(
                    'label' => 'Secondary Image',
                    'id' => 'secondary-image',
                    'post_type' => 'post'
                )
            );
        }

    2. Should it be wrapped within <?php ?> tags?
    3. Should a copy of the functions.php file with this modification be placed in a child theme?

    Also:

    4. If I want the secondary image as the post's 940 x 198 header, should I place this code in the header.php file?

    <?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image'); endif; ?>

    Thanks for any help.

    Kenny

  3. rodsimm
    Member
    Posted 1 year ago #

    Hi,

    So...

    Where does this code go?
    <?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image'); endif; ?>

    A code example would help.

    Many thanks.

  4. bigfatty
    Member
    Posted 1 year ago #

    We may have to figure this thing out ourselves as nobody seems to be responding. I'm not sure why because this seems to be a popular plugin and the installation can't be too difficult. But, I've noticed quite a bit that questions just don't get answered...and if they do, the answers often conflict with each other.

  5. Chris Scott
    Member
    Plugin Author

    Posted 1 year ago #

    The thumbnail registration code (step 3 in the Installation instructions) goes in your functions.php file. It can be anywhere as long as it is after the opening php tag (and before the closing tag if one is used). The thumbnail display code (step 4 in the Installation instructions) is used in your theme file(s) where you want the thumbnail to be displayed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic