Mike Matenkosky
Forum Replies Created
-
Forum: Plugins
In reply to: [Media Library Assistant] PaginationSorry it took so long to respond.
I added the statement back:
<?php $gallery = do_shortcode( sprintf( ‘[mla_gallery post_parent=all id=”%1$s” exclude=”%2$s” columns=”10″ posts_per_page=”20″ orderby=”ASC”]’, $post->post_parent, get_the_ID() ) ); ?>
What I don’t understand is “Leave the attachment_category and attachment_tag parameters out for your first test.” Where? If I remove them on the gallery:
[mla_gallery attachment_category=”att-category-landscape” attachment_tag=”att-tag-sanluisnwr” numberposts=”2″]
I don’t see the images.So I didn’t remove anything. The thumbnails returned, but no of them match the gallery.
I don’t know why the link didn’t work, I’ve been working on my Smugmug site all day.
Forum: Plugins
In reply to: [Media Library Assistant] PaginationGlad to hear that it wasn’t me.
Really appreciate all of your help David!
Forum: Plugins
In reply to: [Media Library Assistant] PaginationUnfortunately I don’t know what I’m doing, so If I didn’t do the debug correctly, please tell me exactly what to do.
I tried removing the taxonomy parameters, but that didn’t work.
I’m beginning to realize that the MLA isn’t going to work in my themes and I will have to do my galleries like I’ve done in the past. I do hope this isn’t the case.
Forum: Plugins
In reply to: [Media Library Assistant] PaginationWhen I changed this:
<?php $gallery = do_shortcode( sprintf( ‘[mla_gallery id=”%1$s” exclude=”%2$s” columns=”10″ numberposts=”20″ orderby=”ASC”]’, $post->post_parent, get_the_ID() ) ); ?>
The gallery thumbnails disappeared. Everything else was as it should.
Here’s the results to the debug:
mla_debug WHERE filter = ' AND ( wp_term_relationships.term_taxonomy_id IN (488) AND tt1.term_taxonomy_id IN (491) ) AND (wp_posts.post_mime_type LIKE \'image/%\') AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\') OR (wp_posts.post_status = \'inherit\' AND (p2.post_status = \'inherit\')))' mla_debug modified WHERE filter = ' AND ( wp_term_relationships.term_taxonomy_id IN (488) AND tt1.term_taxonomy_id IN (491) ) AND (wp_posts.post_mime_type LIKE \'image/%\') AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\') OR (wp_posts.post_status = \'inherit\' AND (p2.post_status = \'inherit\')))' mla_debug query = array ( 'attachment_category' => 'att-category-landscape', 'attachment_tag' => 'att-tag-sanluisnwr', 'order' => 'ASC', 'post_type' => 'attachment', 'post_status' => 'inherit', 'post_mime_type' => 'image', 'nopaging' => true, 'ignore_sticky_posts' => true, 'no_found_rows' => true, ) mla_debug request = 'SELECT wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) LEFT JOIN wp_posts AS p2 ON (wp_posts.post_parent = p2.ID) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (488) AND tt1.term_taxonomy_id IN (491) ) AND (wp_posts.post_mime_type LIKE \'image/%\') AND wp_posts.post_type = \'attachment\' AND ((wp_posts.post_status = \'inherit\') OR (wp_posts.post_status = \'inherit\' AND (p2.post_status = \'inherit\'))) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date ASC ' mla_debug query_vars = array ( 'attachment_category' => 'att-category-landscape', 'attachment_tag' => 'att-tag-sanluisnwr', 'order' => 'ASC', 'post_type' => 'attachment', 'post_status' => 'inherit', 'post_mime_type' => 'image', 'nopaging' => true, 'ignore_sticky_posts' => true, 'no_found_rows' => true, 'error' => '', 'm' => 0, 'p' => 0, 'post_parent' => '', 'subpost' => '', 'subpost_id' => '', 'attachment' => '', 'attachment_id' => 0, 'name' => '', 'static' => '', 'pagename' => '', 'page_id' => 0, 'second' => '', 'minute' => '', 'hour' => '', 'day' => 0, 'monthnum' => 0, 'year' => 0, 'w' => 0, 'category_name' => '', 'tag' => '', 'cat' => '', 'tag_id' => '', 'author_name' => '', 'feed' => '', 'tb' => '', 'paged' => 0, 'comments_popup' => '', 'meta_key' => '', 'meta_value' => '', 'preview' => '', 's' => '', 'sentence' => '', 'fields' => '', 'menu_order' => '', 'category__in' => array ( ), 'category__not_in' => array ( ), 'category__and' => array ( ), 'post__in' => array ( ), 'post__not_in' => array ( ), 'tag__in' => array ( ), 'tag__not_in' => array ( ), 'tag__and' => array ( ), 'tag_slug__in' => array ( ), 'tag_slug__and' => array ( ), 'suppress_filters' => false, 'cache_results' => true, 'update_post_term_cache' => true, 'update_post_meta_cache' => true, 'posts_per_page' => 10, 'comments_per_page' => '50', 'taxonomy' => 'attachment_category', 'term' => 'att-category-landscape', )
You can download the Parent Theme here: https://themehybrid.com/themes/my-life
I appreciate the help trying to figure this out. Honestly, the website that I’m currently using (www.iimagesinthebackcountry.com) works fine. I was thinking of using MLA because I liked some of the features and to maybe make it easier in the long run to add content.
Forum: Plugins
In reply to: [Media Library Assistant] PaginationThe orderby=ASC came from the Parent theme. He used orderby=RAND, so I changed it to ASC.
Changing the shortcode from this
<?php $gallery = do_shortcode( sprintf( ‘[gallery id="%1$s" exclude="%2$s" columns="10" numberposts="20" orderby="ASC"]‘, $post->post_parent, get_the_ID() ) ); ?>
to this doesn’t work. It obviously removed the gallery thumbnails.
<?php $gallery = do_shortcode( sprintf( ‘[mla_gallery id=”%1$s” exclude=”%2$s” columns=”10″ numberposts=”20″ orderby=”ASC”]’, $post->post_parent, get_the_ID() ) ); ?>
Forum: Plugins
In reply to: [Media Library Assistant] PaginationIt started out as the ‘My Life’ theme. It was his personal blog and he used it as the demo on his themhybrid site. He recently changed it, but he didn’t update the old theme on the demo. Its more modified in colors, adding slideshow etc, then adding functions. The gallery isn’t a plugin, this is just how most of the themes run. Here is the ‘attachment-image.php’ file from my Child theme:
I added the Pagination.
<?php /** * My own "Tuolumne Meadows" Attachment Template * I added 'prev-next' class and 'comment-template' class, schema.org/Photograph. * * @package MyLife * @subpackage Template * @since 0.1.0 * @author Justin Tadlock <[email protected]> * @copyright Copyright (c) 2011, Justin Tadlock * @link https://themehybrid.com/themes/my-life * @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ get_header(); // Loads the header.php template. ?> <?php do_atomic( 'before_content' ); // my-life_before_content ?> <div id="content"> <?php dynamic_sidebar('papt-image-sidebar'); //Custom Sidebar for PhotoPress ?> <?php do_atomic( 'open_content' ); // my-life_open_content ?> <div class="hfeed"> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php do_atomic( 'before_entry' ); // my-life_before_entry ?> <div itemscope itemtype="https://schema.org/Photograph" id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>"> <?php do_atomic( 'open_entry' ); // my-life_open_entry ?> <span itemprop="name"><?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?></span> <div class="entry-content"> <?php if ( has_excerpt() ) { $src = wp_get_attachment_image_src( get_the_ID(), 'full' ); echo do_shortcode( '[caption align="aligncenter" width="' . esc_attr( $src[1] ) . '" caption="' . get_the_excerpt() . '"]' . wp_get_attachment_image( get_the_ID(), 'full', false ) . '[/caption]' ); } else { echo wp_get_attachment_image( get_the_ID(), 'full', false, array( 'class' => 'aligncenter' ) ) ; } ?> <div itemprop="description" class="attachment-image-desc"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'my-life' ) ); ?> </div> <div class="prev-next"> <div class="prev"><?php previous_image_link( false, '? Previous' ); ?></div> <div class="next"><?php next_image_link( false, 'Next ?' ); ?></div> </div> <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'my-life' ), 'after' => '</p>' ) ); ?> <?php $gallery = do_shortcode( sprintf( '[gallery id="%1$s" exclude="%2$s" columns="10" numberposts="20" orderby="ASC"]', $post->post_parent, get_the_ID() ) ); ?> <?php if ( !empty( $gallery ) ) { ?> <div class="image-gallery"> <h3><?php _e( 'Gallery', 'my-life' ); ?></h3> <?php echo $gallery; ?> </div> <?php } ?> </div><!-- .entry-content --> <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( 'By [entry-author] on <abbr class="published updated" [entry-published] [entry-edit-link before="| "]', 'my-life' ) . '</abbr></div>' ); ?> <?php do_atomic( 'close_entry' ); // my-life_close_entry ?> </div><!-- .hentry --> <?php do_atomic( 'after_entry' ); // my-life_after_entry ?> <?php do_atomic( 'after_singular' ); // my-life_after_singular ?> <div class="comment-template"> <?php comments_template( '/comments.php', true ); // Loads the comments.php template. ?> </div> <?php endwhile; ?> <?php endif; ?> </div><!-- .hfeed --> <?php do_atomic( 'close_content' ); // my-life_close_content ?> <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?> </div><!-- #content --> <?php do_atomic( 'after_content' ); // my-life_after_content ?> <?php get_footer(); // Loads the footer.php template. ?>
Thought I add this….Only the unattached images display on the bottom gallery regardless of category/tag.
Forum: Plugins
In reply to: [Media Library Assistant] PaginationOne more question related to this. For some background, I’m using one of the https://www.themehybrid.com child themes…highly modified for my photo site. I’m not currently using any lightboxes, so my images display the default ‘attachment-image.php’. When I view one image, I see ALL of my thumbnail images below. I would like to only view the thumbnails for on particular gallery (attachment_category). Here is a link to my testing site.
I only have 4 images, but when you click on a thumbnail, all of the images that I uploaded to the Media Library (thumnails) show up.
Is there a way to only display THAT Gallery/Category?
Forum: Plugins
In reply to: [Media Library Assistant] PaginationOn another site, I was using this in my non-MLA gallery:
[gallery orderby="ASC" numberposts="20" columns="5"] <!--nextpage--> [gallery orderby="ASC" numberposts="20" offset="20" columns="5"]
So I modified it like this. It seems to work. Is there a better way, or is this it? Obviously I’ll had to add more nextpage when I need to.
[mla_gallery orderby="ASC" posts_per_page=20 columns="5" attachment_category="att-category-landscape"] <!--nextpage--> [mla_gallery orderby="ASC" posts_per_page=20 offset="20" columns="5" attachment_category="att-category-landscape"]
Forum: Plugins
In reply to: Featured image not working with NextGEN GalleryI have the same problem, using ‘Trending 0.2’ theme.