WordPress.org

Forums

Picasa and Google Plus Express
[Plugin: Picasa Express x2] How to display in archive first 2 pictures from album (3 posts)

  1. roshi
    Member
    Posted 2 years ago #

    Hi,

    I make web-site to my friend. We use one type of posts that are only for galleries - 1 per post with shortcode like: [pe2-gallery album="....albumID...."].

    How can I return in archive page only first 2 pictures from this gallery.

    I think that can be something like

    <?php if (function_exists('gallery_shortcode')) {	    gallery_shortcode($atts, $content);
    				} else {echo 'Error in function gallery_shortcode';} ?>

    But I'm a really noob with php and this time I'm not sure how to write it.

    Tnx a lot.

    http://wordpress.org/extend/plugins/picasa-express-x2/

  2. Wott
    Member
    Plugin Author

    Posted 2 years ago #

    You can find the answer in changelog where I add new parameters for album shortcode:

    • limit to limit number of images displayed
    • hide_rest=1 include images over limit but with display:none. It's for gallery script which show all images including hidden.
  3. roshi
    Member
    Posted 2 years ago #

    The way that you tell me - I think I can't use it because if I write in shortcode in post limit=2 or hide_rest=2 in post this will shows only 2 pictures when someone open single post page. I want to display there all pictures in album, and only 2 pictures in Archive.

    OK I found other way:

    I have a shortcode (only one!) in my post witch is gallery-post-type:
    [pe2-gallery album="ALBUM_ID"]

    And I want to use something like this in my Archive gallery-post-type page:

    <?php echo do_shortcode('[pe2-gallery album="ALBUM_ID" limit="2"]'); ?>

    How can I use ALBUM_ID that I use in post shortcode in archive post shortcode ... something like:

    <? $album = ALBUM_ID;
    php echo do_shortcode('[pe2-gallery album=" . $album . " limit="2"]'); ?>

    Is there a way to do it ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Picasa and Google Plus Express
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.