Support » Plugin: Related Posts by Taxonomy » Link caption and make all thumbnails same size

  • Resolved taadike


    I am using the gallery_format=”editor_block”. Looks good but I have a few questions.
    Somewhy the caption that appears on the image is not a hyperlink. How to make it a link?
    And another question, why are the thumbnails not the same height? Somewhy the first row of images are taller than the next rows. How to make them all same height?
    And finally, if there is just one related post (or just one image on the final row) somewhy it appears too big – full page width. How to avoid that?

    Thanks a lot.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author keesiemeijer


    Hi taadike

    Can you check if a normal editor gallery block with the same images has the same output.

    Thread Starter taadike



    Thanks for your reply.
    The normal editor gallery block with the same images doesn’t have the same output. All images are the same size when not using the gallery_format=”editor_block”. Also tried on different themes. Somewhy the Editor Block gallery format makes all rows of images different height. For example, if there are ten images, three images per row, then the first row of images are the biggest (in height), second row are a little shorter in height and third row are the smallest, and the fourth row (10th image) is one big image – full width and full height, covering the entire content area width.
    Can they all be same size while still using the gallery_format=”editor_block”?

    Never mind, I just learned that the Block Gallery is meant to behave like that.
    But still one question remains. How to make the captions also hyperlinks? People might click on the captions thinking it is a link as it is overlaid on the image.

    • This reply was modified 3 years, 11 months ago by taadike.
    Thread Starter taadike


    By the way, I just found another bug. When using the gallery_format=”editor_block”, then somewhy the images are always loaded in full resolution (just scaled down), even though I am using the parameter image_size=”thumbnail”.
    How to make it load only thumbnails or medium sized images? There is no point in loading full sized images.

    Plugin Author keesiemeijer


    Image sizes don’t work for gallery format editor_block. This is how the Gutenberg editor does it at the moment. See

    Don’t use this format if it’s not working for you. I’m preparing this plugin for a related posts block. I’m just following how the WP gallery block does it at the moment.

    Use the link_caption option to link post titles (be aware you might need to style them yourself)

    Or for the widget use this filter in your (child) theme’s functions.php file

    add_filter( 'related_posts_by_taxonomy_widget_args', 'rpbt_widget_filter', 10, 2 );
    function rpbt_widget_filter( $args, $instance ) {
        $args['link_caption'] = true;
        return $args;

    consider creating a child theme instead of editing your theme directly – if you upgrade the theme all your modifications will be lost. Or create a plugin with the code above.

    Thread Starter taadike


    Cool, thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Link caption and make all thumbnails same size’ is closed to new replies.