WordPress.org

Support

Support » Plugins and Hacks » [Resolved] How do I Install this product?

[Resolved] How do I Install this product?

  • 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    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.

    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.

    Plugin Author Chris Scott

    @chrisscott

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How do I Install this product?’ is closed to new replies.