getButterfly
Resume

Image behaviour in ImagePress – single page or media view

There are two ways of displaying a gallery image: single view or media view. The ImagePress image behaviour dictates what to open when clicking on an image (single image or custom post template).

ImagePress Image Behaviour

If you pick media view, all gallery images will open in a full tab, or, if you have a lightbox plugin installed and active, in a lightbox/modal window.

The media view requires no custom coding on your part.

The single view, on the other hand, requires setting up a new single template. The most basic example requires you to duplicate your single.php or singular.php template (or, in some cases, even page.php) and replace the_content() with if (function_exists('ip_main')) { ip_main(get_the_ID()); }. See a brief example below:

<?php get_header(); ?>

<section id="content" role="main">
    <?php if (have_posts()) : while(have_posts()) : the_post(); ?>
        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
            <?php
            /* BEGIN IMAGEPRESS CODE */
            if (function_exists('ip_main')) {
                ip_main(get_the_ID());
            }
            /* END IMAGEPRESS CODE */
            ?>
        </article>

        <?php comments_template('', true); ?>
    <?php endwhile; endif; ?>
</section>

<?php get_footer();

Your theme may have a different structure or use a loop template to display posts and pages. Contact me for any request or further explanations.



My Battle Tested Recommendations

Jetpack
Dreamhost
WordPress.com
CodeCanyon
SEMrush

Disclaimer: These recommendations contain affiliate links.