• mikelmalone

    (@mikelmalone)


    How can I get the gallery by the post ID and not have to use a specific ID in a custom post type as I use one template for different galleries.

    If I do this it works but only for that gallery

    <?php if ( function_exists( 'envira_gallery' ) ) { envira_gallery( '35' ); } ?>

    but I need to do something like this

    <?php if ( function_exists( 'envira_gallery' ) ) { envira_gallery( '$post->ID' ); } ?>

    Thanks

    https://wordpress.org/plugins/envira-gallery-lite/

The topic ‘Add gallery to custom post type’ is closed to new replies.