WordPress.org

Ready to get started?Download WordPress

Forums

simple scrollbar gallery
Added support for exclude. (2 posts)

  1. wycks
    Member
    Posted 2 years ago #

    Nice simple plugin, it did not have support for the exclude parameter.

    I added it by doing the following, for post thumbnail featured image.

    In simple-scrollbar-gallery.php

    replace the lines 99-101 with the following;

    $exclude = get_post_thumbnail_id( $post->ID. 'thumbnail' );
    
    	extract(shortcode_atts(array(
    		'order'      => 'ASC',
    		'orderby'    => 'menu_order ID',
    		'id'         => $post->ID,
                    'exclude' => $exclude,
    	), $attr));
    
    	$id = intval($id);
    	$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby, 'exclude' => $exclude) );

    http://wordpress.org/extend/plugins/simple-scrollbar-gallery/

  2. netaction
    Member
    Plugin Author

    Posted 2 years ago #

    Oh thanks, that's great. Could you please poste this on my blog https://www.netaction.de/wordpress-plugin-simple-scrollbar-gallery/ too?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic