WordPress.org

Ready to get started?Download WordPress

Forums

Would like to modify the standard WP Gallery (4 posts)

  1. techstar
    Member
    Posted 4 years ago #

    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

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    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.

  3. techstar
    Member
    Posted 4 years ago #

    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.

  4. techstar
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic