Title: format=&#8221;thumbnails&#8221; conflicting with something ?
Last modified: October 23, 2018

---

# format=”thumbnails” conflicting with something ?

 *  Resolved [ctrlaltdelete](https://wordpress.org/support/users/ctrlaltdelete/)
 * (@ctrlaltdelete)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/)
 * Hello i’m using this code:
    `echo do_shortcode( '[related_posts_by_tax posts_per_page
   ="8" caption="post_title" columns="3" format="thumbnails"]' );`
 * The problem is that when i click a thumbnail instead of going to the post it 
   attempts to display a “lightbox” and fails. I don’t want this at all i ant them
   to be links only not a “gallery”.
 * > [View post on imgur.com](https://imgur.com/nDFHmfM)
 * Then there’s all these Gallery classes i think they are causing it:
 *     ```
       <div id="rpbt-related-gallery-1" class="gallery related-gallery related-galleryid-29145 gallery-columns-3 gallery-size-thumbnail"><figure class="gallery-item">
       <div class="gallery-icon portrait">
       ```
   
 * > [View post on imgur.com](https://imgur.com/NzHxiD8)
    -  This topic was modified 7 years, 11 months ago by [ctrlaltdelete](https://wordpress.org/support/users/ctrlaltdelete/).
    -  This topic was modified 7 years, 11 months ago by [ctrlaltdelete](https://wordpress.org/support/users/ctrlaltdelete/).

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10815687)
 * Hi ctrlaltdelete
 * Yes, your theme or a plugin is using the gallery CSS selectors of the gallery
   to open them in a lightbox. You can change the class names with a filter, but
   it could mean you lose some styling for the gallery.
 * Try adding this to your theme’s functions.php file
 *     ```
       add_filter( 'related_posts_by_taxonomy_gallery_item_class', 'rpbt_gallery_item_class' );
   
       function rpbt_gallery_item_class($class) {
           return 'rpbt-gallery-item';
       }
       ```
   
 * btw:
    consider creating a [child theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/)
   instead of editing your theme directly – if you upgrade the theme all your modifications
   will be lost. Or [create a plugin](https://wordpress.org/plugins/pluginception/)
   with the code above.
 *  Thread Starter [ctrlaltdelete](https://wordpress.org/support/users/ctrlaltdelete/)
 * (@ctrlaltdelete)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816558)
 * Hello i am using a child theme.
    With that function they display one under the
   other (instead of side by side) but still show a lightbox when clicked.
 * Is there a way for me to make my own html from scratch? I only need post titles,
   permalink and thumbnail url. I’d like to do the rest myself if possible.
 * But i’m scared to lose the plugin cache which is a must else the query isn’t 
   fast enough.
 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816601)
 * You could create a new template and format. Read more about it here
    [https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/templates/#create-format](https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/templates/#create-format)
 * How do you cache the related posts? With a cache plugin or with the plugin cache
   feature?
 *  Thread Starter [ctrlaltdelete](https://wordpress.org/support/users/ctrlaltdelete/)
 * (@ctrlaltdelete)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816761)
 * Perfect, that solves it. I can tweak to my needs now, no more light box.
 * I use this for caching:
    `add_filter( 'related_posts_by_taxonomy_cache', '__return_true');`
 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816819)
 * Oh good, the posts will still be cached if you create a new format. Btw. it also
   would be if you used plugins (like wp super cache) to cache your site.
 * Let me know if you need help with the new format or template.
 *  Thread Starter [ctrlaltdelete](https://wordpress.org/support/users/ctrlaltdelete/)
 * (@ctrlaltdelete)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816881)
 * The format is solved i think.
 * I got a slow query from the plugin that doesn’t go away even with caching enabled:
 * time varies from 0.05~0.1
 * get_crp_posts_id()
 *     ```
       SELECT DISTINCT wp_posts.ID 
       FROM wp_posts 
       WHERE 1=1 
       AND MATCH (post_title,post_content) AGAINST ('Shin Megami tensei if...') 
       AND wp_posts.post_date < '2018-10-25 19:51:51' 
       AND wp_posts.post_date >= '2015-10-26 19:51:51' 
       AND wp_posts.post_status = 'publish' 
       AND wp_posts.ID != 115618 
       AND wp_posts.post_type IN ('post') 
       LIMIT 0, 6
       ```
   
 * I want to mention that my post_content is EMPTY i only use custom fields no content.
   
   I also don’t use the post type ‘post’ and dates aren’t a factor, all posts are
   equally relevant. I don’t understand what this query is doing but can i speed
   it up or get rid of it?
 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816897)
 * That’s not a query from this plugin.
 *  Thread Starter [ctrlaltdelete](https://wordpress.org/support/users/ctrlaltdelete/)
 * (@ctrlaltdelete)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816902)
 * Amazing, i see. It’s my previous related post plugin. Close this before i embarrass
   myself even more.
 *  Plugin Author [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816940)
 * No worries. Glad you’ve got it solved 🙂
 * And you shouldn’t be embarrassed to not know every query this plugin makes! It
   seems apparent you know what you are doing!

Viewing 9 replies - 1 through 9 (of 9 total)

 The topic ‘format=”thumbnails” conflicting with something ?’ is closed to new replies.

 * ![](https://ps.w.org/related-posts-by-taxonomy/assets/icon.svg?rev=1115231)
 * [Related Posts by Taxonomy](https://wordpress.org/plugins/related-posts-by-taxonomy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-by-taxonomy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-by-taxonomy/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-by-taxonomy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-by-taxonomy/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/formatthumbnails-conflicting-with-something/#post-10816940)
 * Status: resolved