WordPress Glossary Plugin (CMTG) - Extras - Changing The Thumbnails' Size On The Glossary Index


Changing The Thumbnails' Size On The Glossary Index

Back to User Guide

With the WordPress Glossary plugin, it's possible to change the size of the thumbnails of the "Classic + definition" and "Classic + excerpt"  display styles (read the guide about style templates).

Warning: This method requires editing the configuration files of your theme. Remember to always backup all files before committing any changes.

  • Open the functions.php file in your theme.
  • Add the following lines to the end of the file:
    • add_filter('cmtt_thumbnail_size', 'cminds_tooltip_thumbnail_resize');

      function cminds_tooltip_thumbnail_resize($array) { return array(x,y); }

  • Change the "x" and "y" in the above code for the desired width and height values in pixels. For instance, return array(75,100)  will return thumbnails with the dimension 75 pixels by 100 pixels, as shown:
Dimension example - WordPress as a Wiki
Dimension example

For reference, this is the line of code in the functions.php that handles the thumbnail size: 

apply_filters( 'cmtt_thumbnail_size', array( 50, 50 ) )

Learn more about filters on WordPress.org.


More information about the WordPress Glossary Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.