• Resolved ladylizzyh

    (@ladylizzyh)


    Hi there, I’ve been looking for a way to display a gallery on each album page i have using php template. I was wondering if there is a code i could add to the php album page template I have so that if the inpost gallery for that page has images uploaded these will automatically be loaded into a gallery in that album page.. (rather than using the text editor) I hope this makes sense..
    Here is an example page..
    http://www.entertaininc.co.uk/albums/duncan-howlett-guitarist/
    I’d love to have the thumbnail gallery appear under the artist featured image for example and this be the same for each of these page types but with the images specific to that page..

    https://wordpress.org/plugins/inpost-gallery/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ladylizzyh

    (@ladylizzyh)

    i’ve worked out how to add the shortcode to my post template. But can’t work out how to call post id of page i’m on instead of specific post id..
    e.d instead of post_id=”10″ i need to to call whatever post id is right for page it’s on.. figure i need to do something like post_id=”post_id” but can’t get in right.. any help would be hugely appreciated!

    Plugin Author RealMag777

    (@realmag777)

    Hello
    Just not write that post_id attribute in the shortcode attribute, and if shortcode inserted in the single page it will take its ID automatically …

    Thread Starter ladylizzyh

    (@ladylizzyh)

    I have tried take out post_id”” from the shortcode as you described but then no gallery shows..
    This is what I currently have in my page.PHP template..

    <?php 
    
    echo do_shortcode('[inpost_gallery thumb_width="100" thumb_height="100" post_id="" thumb_margin_left="0" thumb_margin_bottom="0" thumb_border_radius="2" thumb_shadow="0 1px 4px rgba(0, 0, 0, 0.2)" js_play_delay="3000" id="" random="0" group="0" border="" type="yoxview" show_in_popup="0" album_cover="" album_cover_width="200" album_cover_height="200" popup_width="800" popup_max_height="600" popup_title="Gallery"][/inpost_gallery]'); 
    
    ?>

    I need to write something in post_id=”****” to make it pull the id from the post automatically for all the different pages using that template.. so that the gallery shows photos that are loaded on each different post..

    Plugin Author RealMag777

    (@realmag777)

    Hello
    Update please to 2.1.2 and in shortcode remove attribute post_id="" at all!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘displaying gallery in a php page template..’ is closed to new replies.