WordPress.org

Support

Support » Plugins and Hacks » Would like to modify the standard WP Gallery

Would like to modify the standard WP Gallery

  • Is it possible to modify some things in the standard wordpress gallery?
    http://en.support.wordpress.com/images/gallery/#editing-a-gallery

    I’ve read this page and havent found anything close to what I would like to do.

    I would like to do the following:

    – Exclude specific images, like thumbnails from appearing in the gallery.

    – Add previous or next links, or a set of thumbnails on each gallery item, like this: http://gadgetcrave.com/lenovo-drops-new-pictures-of-its-lephone/4954/

    – Customize the title page of the gallery, perhaps even put a custom note on each image page

    – Having all comments go to the main post, or just not have comments on gallery items

    Is this a big undertaking? Any direction is appreciated. Maybe someone has already done something similar to this and could share their info. Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    @esmi

    Forum Moderator

    Exclude specific images, like thumbnails from appearing in the gallery.

    Sorry? What would be the difference between an image that you wanted to exclude and an image that you didn’t?

    Add previous or next links[…]
    Customize the title page of the gallery […]
    Having all comments go to the main post […]

    Create a image.php template file and use the next_image_link and previous_image_link tags.

    Sorry? What would be the difference between an image that you wanted to exclude and an image that you didn’t?

    Well the way it works now is it includes all images uploaded to that post in the gallery. But say one of the images is a custom sized thumbnail and not a full size image for the gallery. I would like this image to be removed some how?

    Create a image.php template file and use the next_image_link and previous_image_link tags.

    Ahh, ok I will play with that, thank you.

    Was able to search based on this information you gave me and found the following: http://wordpress.org/support/topic/174564?replies=14
    and
    http://www.walkernews.net/2009/04/17/how-to-create-image-template-file-for-the-classic-wordpress-theme/

    This has helped alot.

    My last question is when excluding an image from the gallery insert on the post page, example [gallery exclude="70052"]

    The excluded image still appears in the list of images within the custom galleries image.php

    I’m using this code to show the thumbnails:

    <?php
    $post_parent = get_post($post->ID, ARRAY_A);
    $parent = $post_parent['post_parent'];
    
    $attachments = get_children("post_parent=$parent&post_type=attachment&post_mime_type=image&orderby=menu_order ASC, ID ASC");
    foreach($attachments as $id => $attachment) :
    	echo wp_get_attachment_link($id, 'thumbnail', true);
    endforeach;
    ?>

    And is there a way to include the post excerpt on the gallery page? The standard <?php the_excerpt(); ?> does not display the information.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Would like to modify the standard WP Gallery’ is closed to new replies.
Skip to toolbar